[Webkit-unassigned] [Bug 60161] [Qt] Virtual Keyboard is not hidden when you 'unfocus' from input field / QGraphicsWebview

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue May 31 02:24:41 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=60161


Topi Reiniƶ <topi.reinio at nokia.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |topi.reinio at nokia.com




--- Comment #5 from Topi Reiniƶ <topi.reinio at nokia.com>  2011-05-31 02:24:40 PST ---

(In reply to comment #4)
> I can confirm the issue with QtTestBrowser. However I set low priority to reflect that we have nobody working on this, Kenneth has other priorities at the moment.

This is quite bad for 3rd party apps, since it affects everything (QML WebView, QGraphicsWebView and QWebView). Is this still stuck in the backlog?

I created a clumsy workaround for this using an event filter and sending CloseSoftwareInputPanel events whenever the focused widget changes to zero:

class EventFilter : public QObject
{   
protected:
    bool eventFilter(QObject *obj, QEvent *event) {
        QInputContext *ic = qApp->inputContext();
        if (ic) {
            if (ic->focusWidget() == 0 && prevFocusWidget) {
                QEvent closeSIPEvent(QEvent::CloseSoftwareInputPanel);
                ic->filterEvent(&closeSIPEvent);
            } else if (prevFocusWidget == 0 && ic->focusWidget()) {
                QEvent openSIPEvent(QEvent::RequestSoftwareInputPanel);
                ic->filterEvent(&openSIPEvent);
            }
            prevFocusWidget = ic->focusWidget();
        }
        return QObject::eventFilter(obj,event);
    }

private:
    QWidget *prevFocusWidget;
};

This will also do the reverse, i.e, request SIP to open when focus widget
changes to non-null, resulting in a single-tap VKB popup.

This filter can be then installed on a QGraphicsView or (in QML) on a
QDeclarativeView instance:

EventFilter ef;
view.installEventFilter(&ef);


But of course, to have a consistent user experience, it would be way better to have this fixed directly in webkit.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list