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

Qt5 Regression in overriden short-cuts

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.4.2
    • 5.3.2
    • WebKit
    • None
    • 8e3254696e043df4e31a4de2c413a9847ed2cf95

    Description

      I have some window with a QWebView into.
      I create QAction with a shortcut CTRL+Z in my window and add it in window menubar.
      When I pressed CTRL+Z, do nothing. But if I click on action in menubar then my handler is invoked.
      In Qt4 then I press on keys handler is invoked.

      I think this issue exist because logic shortcutEventHandler into QWebPage was changed.

      This is a handler in Qt4: http://i.imgur.com/Kr4c2Le.png
      It's in Qt5: http://i.imgur.com/ck1JAmA.png
      http://i.imgur.com/gZ88J1H.png

      In Qt4 if editor.canEdit() is false then do nothing and event not accepted.
      In Qt5 this logic was changed: if editor.canEdit() is false, QWebPageAdapter::handleShortcutOverrideEvent returened false and

        if (editorActionForKeyEvent(event) != QWebPage::NoWebAction)
              event->accept(); 

      in QWebPagePrivate::shortcutOverrideEvent will invoked.

      Also this issue reproduce with other shortcuts (for example, Return). I think, it will reproducing with each shortcut which contains in array editorActions in QWebPagePrivate::editorActionForKeyEvent.

      Attachments

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

        Activity

          People

            allan.jensen Allan Sandfeld Jensen
            timocov Evgeny Timokhov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes