diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2016-09-13 18:17:43 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2016-11-10 11:58:00 +0000 |
commit | 58467ed1950ee070d0907cbdabb8466aba277305 (patch) | |
tree | 476f9565958078738676dd57aba2b31d70107240 /src/webenginewidgets/render_widget_host_view_qt_delegate_widget.h | |
parent | ff26fa899f095eff9b3265b462e97c7e48ab06f5 (diff) |
Fix select tag interaction when the web view is inside a modal dialog
Previously when a QWebEngineView was inside a modal QDialog, trying to
click on a select tag option did not properly select the option. It
either focused the new option without closing the popup, or didn't
focus it at all.
Fix consists in making sure the newly created popup QWindow and
RenderWidgetHostViewQtDelegateWidget are marked as children of the
QWebEngineView, so that they are considered part of the current modal
session by the OS, thus allowing user interaction with them.
Because the ownership of the delegate widget should still be retained
by its respective RenderWidgetHostViewQt instance, the QObject parent
of the delegate is unset before the parent is destroyed.
Also to make it work on macOS, the window attribute has to be set
to Qt::Tool instead of Qt::ToolTip.
Change-Id: I56d6f446254a624428a0c661ac3c49eb409c931e
Task-number: QTBUG-54836
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'src/webenginewidgets/render_widget_host_view_qt_delegate_widget.h')
-rw-r--r-- | src/webenginewidgets/render_widget_host_view_qt_delegate_widget.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.h b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.h index ecf2d2d33..aa9495105 100644 --- a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.h +++ b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.h @@ -92,6 +92,7 @@ protected: private slots: void onWindowPosChanged(); + void removeParentBeforeParentDelete(); private: RenderWidgetHostViewQtDelegateClient *m_client; |