summaryrefslogtreecommitdiffstats
path: root/src/core/web_contents_adapter.cpp
diff options
context:
space:
mode:
authorKirill Burtsev <kirill.burtsev@qt.io>2021-03-17 13:21:57 +0100
committerKirill Burtsev <kirill.burtsev@qt.io>2021-03-23 19:50:21 +0100
commit99cdb9380ee249ae26b8f3b30fa89ce258217260 (patch)
tree12e3b4387685507a776e5030808a8f91d266458d /src/core/web_contents_adapter.cpp
parentc1ba8bdae978ffbdf55d95ce3b342b09bf6fb738 (diff)
Abort findText also right on explicit navigation request
Current implementation cancels current findText only when new navigation is accepted (since it may be rejected all together), so it's not guaranteed that user code will not receive completion callback if it arrives after explicit load/setContent/setHtml but before acceptNavigationRequest. For explicit navigation it doesn't make sense to wait until it's accepted, since it's only exposed there just for consistency, and an expectation for findText is that it should be canceled on new navigation. Fixes: QTBUG-61887 Change-Id: Ia2e19df3b5712e6b5426443d1bce6b205e186668 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
Diffstat (limited to 'src/core/web_contents_adapter.cpp')
-rw-r--r--src/core/web_contents_adapter.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp
index bfeab41a2..5597c69f9 100644
--- a/src/core/web_contents_adapter.cpp
+++ b/src/core/web_contents_adapter.cpp
@@ -381,6 +381,7 @@ void Navigate(WebContentsAdapter *adapter, const content::NavigationController::
adapter->webContents()->GetController().LoadURLWithParams(params);
adapter->focusIfNecessary();
adapter->resetSelection();
+ adapter->findTextHelper()->stopFinding();
}
void NavigateTask(QWeakPointer<WebContentsAdapter> weakAdapter, const content::NavigationController::LoadURLParams &params)