diff options
author | Alexandru Croitor <alexandru.croitor@theqtcompany.com> | 2015-12-15 16:29:18 +0100 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@theqtcompany.com> | 2015-12-16 15:25:24 +0000 |
commit | cce1c85f5aa0ab66620337de4d640e654e4279a0 (patch) | |
tree | c8b0831f37bba2c6cf4c59f721bd603b39b0dcf3 /src | |
parent | 318cd591e2af2a8f825a0742762a5d93345e0753 (diff) |
Fix MouseReleaseEvent not being sent when clicking on a context item.
The context menu that appears, when right clicking in a WebEngineView,
does not have a parent. On OSX if a context menu does not have a parent,
a MouseReleaseEvent is not sent when an item is chosen in the menu,
and thus consecutive mouse events are not handled properly.
The fix consists in assiging the WebEngineView as the QML parent
for the context menu that is opened.
Task-number: QTBUG-44666
Change-Id: I7f79d4497c57a814866089195da1570591a6999e
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/webengine/api/qquickwebengineview.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/webengine/api/qquickwebengineview.cpp b/src/webengine/api/qquickwebengineview.cpp index ff2647e3e..4f99a3e81 100644 --- a/src/webengine/api/qquickwebengineview.cpp +++ b/src/webengine/api/qquickwebengineview.cpp @@ -178,7 +178,9 @@ bool QQuickWebEngineViewPrivate::contextMenuRequested(const WebEngineContextMenu { Q_Q(QQuickWebEngineView); - QObject *menu = ui()->addMenu(0, QString(), data.pos); + // Assign the WebEngineView as the parent of the menu, so mouse events are properly propagated + // on OSX. + QObject *menu = ui()->addMenu(q, QString(), data.pos); if (!menu) return false; |