Details
-
Bug
-
Resolution: Won't Do
-
P2: Important
-
None
-
5.12
-
None
Description
Recent ci test failures:
FAIL! : tst_QWebEnginePage::findText() Compared values are not the same Actual (((m_view->hasSelection()))): 0 Expected (true) : 1 Loc: [tst_qwebenginepage.cpp(911)]
tst_QWebEngineView::mouseClick
FAIL! : tst_QWebEngineView::mouseClick() 'selectionChangedSpy.wait()' returned FALSE. () Loc: [tst_qwebengineview.cpp(1480)]
and probably:
FAIL! : tst_QWebEnginePage::runJavaScriptFromSlot() Compared values are not the same Actual (((result))) : QVariant() Expected (QVariant(4)): QVariant(int,4) Loc: [tst_qwebenginepage.cpp(1667)] FAIL! : tst_QQuickWebEngineView::inputMethod() '((static_cast<QGuiApplication *>(QCoreApplication::instance()))->focusObject())' returned FALSE. () Loc: [tst_qquickwebengineview.cpp(450)]
Even though
QWebEngineSettings::FocusOnNavigationEnabled
setting set to true and there is a call inside WebContentAdapter:
m_webContents->Focus()
the actual focus is set asynchronously in
WidgetInputHandlerImpl::SetFocus()
That is why some methods calls inside WevContentsImpl (like SelectAll, Replace, Copy, etc) are just ignored right after
page->setContent(), setHtml() or load()
Actual focused frame is set in frame_tree.cc:
void FrameTree::SetFocusedFrame(...) { ... focused_frame_tree_node_id_ = node->frame_tree_node_id(); node->DidFocus(); ... }
and DidFocus calls FrameTreeNode::Observer, so potential solution is to add FrameTreeNode::AddObserver.
Attachments
Issue Links
- relates to
-
QTBUG-75505 QWebEngineView selectedText() does not respond to triggerPageAction SelectAll
- Closed