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

Window shortcuts prevent keystrokes from reaching webview

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P2: Important
    • None
    • 5.6.1, 5.7.0
    • WebEngine
    • None
    • Tested on Mac; users report same issues on other platforms.

    Description

      The attached zip file contains the simplebrowser example project with a one line change:

      newTabAction->setShortcut(QKeySequence(QLatin1String("c")));

      If you run the project, wait for the Qt website to load, and click on the search button on the right, then type "abc", you'll see that only "ab" will appear, and a new tab will open. The c character never seems to make it to the input element in the webview, instead being swallowed by the shortcut. WebKit behaved differently in this case - if an input element was focused then the key would go to the input element, and the shortcut would only fire if there was no active input element.

      Aside from breaking single character shortcut keys (like gmail shortcuts), it also breaks ctrl+z in a text field to undo the current typing, if the application has a different behaviour for ctrl+z when no input is focused. And same with ctrl+a for select all in the input area vs something else when no input is focused.

      Attachments

        Issue Links

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

          Activity

            People

              qt_webengine_team Qt WebEngine Team
              qtdae2 Damien Elmes
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes