Details
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
For Gerrit Dashboard: QTBUG-44019 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
104053,2 | Editor actions should only be checked when page is editable | 5.4 | qt/qtwebkit | Status: MERGED | +2 | 0 |