summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2016-07-14 17:27:52 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2016-08-04 15:34:30 +0000
commit5f18e75300bfeffca85c0891601fb213c4197501 (patch)
treec6ae8ca181684a53f7dc73018f535b9785d811eb /src
parentffd68f2d472968b092957c40f3c46c9c70242126 (diff)
Fix issue where Chromium thought it had active focus
Previously, when a WebEngineView's RenderWidgetHostViewQtDelegateQuick had focus, but not activeFocus, Chromium was told that it had keyboard focus. That is not correct, because having focus inside the FocusScope (the WebEngineView), does not mean it has keyboard focus, it just means the RWHVQDQ will receive active focus, when the WebEngineView does. The call path for that erronous check was done when a new page was loaded, specifically going through NavigatorImpl::DidNavigate() -> RenderFrameHostManager::CommitPending() -> render_frame_host_->GetView()->HasFocus() -> RenderWidgetHostViewQtDelegateQuick::hasKeyboardFocus(), which resulted in incorrect display of a blinking caret in an input, when the view actually wasn't focused. The fix consists in checking for the activeFocus rather than the focus property. Change-Id: I97002be3fc8adfec2228a1b5ad62696f8872d3cc Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/webengine/render_widget_host_view_qt_delegate_quick.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/webengine/render_widget_host_view_qt_delegate_quick.cpp b/src/webengine/render_widget_host_view_qt_delegate_quick.cpp
index b10ca8bdb..e198e5e0d 100644
--- a/src/webengine/render_widget_host_view_qt_delegate_quick.cpp
+++ b/src/webengine/render_widget_host_view_qt_delegate_quick.cpp
@@ -128,7 +128,7 @@ void RenderWidgetHostViewQtDelegateQuick::setKeyboardFocus()
bool RenderWidgetHostViewQtDelegateQuick::hasKeyboardFocus()
{
- return hasFocus();
+ return hasActiveFocus();
}
void RenderWidgetHostViewQtDelegateQuick::lockMouse()