Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-139601

QWebEngineView: cursorRectangleChanged not emitted on populated field refocus with Tab

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 6.8.1, 6.9.0
    • WebEngine
    • 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.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qt_webengine_team Qt WebEngine Team
            yfyf Ignas Vyšniauskas
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes