Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.6, 5.7, 5.8, 5.9.3, 5.10.0, 5.9
-
None
-
Linux 64bit
Description
The attached example shows the use-case: QQuickWidget loads a QML with an input field. On the top a QLineEdit waits for input. When pressing enter in the QLineEdit it is expected to forward the keyboard focus to the QQuickWidget's input field. This mimics the behavior of an url bar and a web view.
When a QCompleter is set on the QLineEdit and the completer matches, a popup is shown which makes the QQuickWidget's window inactive and blocks forceActiveFocus on the QQuickWidget content when pressing enter.
Steps to reproduce:
- Build and start the attached example
- Start type "te" (word "test" is hardcoded in the example)
- Press Enter
- Start typing again
Expected behavior
Keyboard focus is on the QQuickWidget's input field and the typed text appears in it
Actual behavior
No focus, no text appearing
This was originally a webengine issue: https://bugreports.qt.io/browse/QTBUG-56652
The corresponding workaround is in this is example too (guarded with #if 0). Enabling it makes the focus work. However this workaround raised yet another issue: https://bugreports.qt.io/browse/QTBUG-59080
I would expect the focus is passed without any workaround in the described case.
I tested this on Windows and Mac OS too. On other platforms than Linux everything works as expected.
Attachments
Issue Links
- relates to
-
QTBUG-56652 QWebEngineView does not get keyboard focus in some cases
- Closed