-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
6.8.1, 6.9.0
-
None
In QWebEngineView, when using (Shift+)Tab to focus->unfocus->focus a populated HTML input text field, the second re-focus seems to not produce a cursorRectangleChanged event.
Attached is a simple HTML page that can be used to reproduce the issue. And here is a repo with a demo app that logs of cursorRectangleChanged and anchorRectangleChanged events: https://github.com/yfyf/qt-focus-issue/tree/webengine-cursor-rectangle
Reproducing the issue
Build and run the demo app. Perform the steps below while observing the logs:
1. Enter some text in the input field
2. Press TAB to focus the Button
3. Press Shift+TAB to focus back to the input field, text gets selected
4. Press TAB again to focus the Button
5. Press Shift+TAB to focus back to the input field
Observe that after Steps 1-4, anchorRectangleChanged and cursorRectangleChanged events are logged. However, after Step 5 no event is logged - cursorRectangleChanged signal never arrives.
This has something to do with the text selection, since the issue does not happen if the input field is empty.
Also, there might be more events/updates missing here, because the way I discovered this is that the virtual keyboard was not being requested/activated after the re-focus.