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

QWebEngineView does not get keyboard focus in some cases

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • 5.8.0
    • 5.8.0 Alpha
    • WebEngine
    • None
    • Linux
    • 01c029fd90162bdbbcf9534537f26138a333c570

      A special use case is if the browser application based on Qt WebEngine Widgets implements an URL bar with autocomplete support by QCompleter. If the QCompleter matches (the loadable url in the model) QWebEngineView does not get the keyboard focus.

      I've attached a simple example to reproduce this. Follow these steps:
      1. Start the application it has a minimalistic url bar at the top
      2. Type www.google.com and press enter
      3. The Google site will be loaded
      4. Start type something

      Expected behavior:
      The text that you typed appears in the Google's input field

      Actual behaviour:
      No text appears in the input field until you click on the view, however it seemingly has the focus

      Be aware of that the "www.google.com" string is hard coded in the example. Typing any other text will also load www.google.com but everything will work as expected because QCompleter won't match.

      This issue also can be reproduced by demobrowser (it uses QCompleter).

      This issue affects 5.8 only. It seems to me this issue exists since QWebEngineView uses QQuickWidget: https://codereview.qt-project.org/#/c/163267/

        For Gerrit Dashboard: QTBUG-56652
        # Subject Branch Project Status CR V

            pvarga Peter Varga
            pvarga Peter Varga
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes