From 5b219fc20dbfe6090af45c1dbdb7ad50bc743ca1 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Mon, 27 Jun 2016 16:52:55 +0200 Subject: Clear internal selected text when searching MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously if a selection was made on a web page, and afterwards a find operation is executed, the selection in the web page would be cleared, but the call to selectedText() would still return the old selection. Make sure selectedText() is always cleared, when starting a find operation, as well as when stopping one. Change-Id: If78f0fa1dd836a52184015e749ef5a84b9f784cd Task-number: QTBUG-54071 Reviewed-by: Michael BrĂ¼ning --- src/3rdparty | 2 +- src/core/web_contents_adapter.cpp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/3rdparty b/src/3rdparty index d0dbe5636..79930a541 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit d0dbe5636cb9d424db0c7ee7850c97d578150138 +Subproject commit 79930a541473b2e0f950d040c16ab6f22e4aeef3 diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp index c450768fa..709efe9b3 100644 --- a/src/core/web_contents_adapter.cpp +++ b/src/core/web_contents_adapter.cpp @@ -782,6 +782,9 @@ void WebContentsAdapter::stopFinding() { Q_D(WebContentsAdapter); d->webContentsDelegate->setLastSearchedString(QString()); + // Clear any previous selection, + // but keep the renderer blue rectangle selection just like Chromium does. + d->webContents->Unselect(); d->webContents->StopFinding(content::STOP_FIND_ACTION_KEEP_SELECTION); } -- cgit v1.2.3