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

[REG 6.4] Initial widget focus is wrong

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P1: Critical P1: Critical
    • 6.4.0 RC1, 6.5.0 Beta1
    • 6.4.0 Beta2
    • WebEngine
    • None
    • a7d353ae7d (qt/qtwebengine/dev) d77fc39d99 (qt/qtwebengine/6.4) d77fc39d99 (qt/tqtc-qtwebengine/6.4) a7d353ae7d (qt/tqtc-qtwebengine/dev) d77fc39d99 (qt/qtwebengine/6.4.0) d77fc39d99 (qt/tqtc-qtwebengine/6.4.0)

      With the attached reproducer and a minimal .pro such as:

      QT += core widgets webenginewidgets
      
      TARGET = testbrowser
      TEMPLATE = app
      
      SOURCES += main.cpp
      

      with Qt 6.3, the focus rectangle appears after 2s as expected:

      and the printed output is:

      JS focused:  QVariant(QString, "TEXTAREA")
      QApp focused:  QtWebEngineCore::RenderWidgetHostViewQtDelegateWidget(0x55bd630ed580)
      

      With Qt 6.4, however, the JS element is focused, and keyboard input lands there, but no focus rectangle or flashing cursor appears:

      and the output shows that some QQuickWidget rather than the RenderWidgetHostViewQtDelegateWidget has focus:

      JS focused:  QVariant(QString, "TEXTAREA")
      QApp focused:  QQuickWidget(0x559a5cee8220)
      

      When clicking the web page (anywhere outside of the textarea) before the 2s passed, then things work as expected, however.

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

            pvarga Peter Varga
            the compiler Florian Bruhin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes