Convert search to blue selection when entering caret mode

This commit is contained in:
Jay Kamat 2018-02-21 10:01:27 -05:00
parent ada15510a7
commit 2ffb1604d3
No known key found for this signature in database
GPG Key ID: 5D2E399600F4F7B5

View File

@ -218,6 +218,13 @@ class WebEngineCaret(browsertab.AbstractCaret):
if mode != usertypes.KeyMode.caret:
return
# Clear search, replace with blue selection
if self._tab.search.search_displayed:
# We are currently in search mode.
# convert the search to a blue selection so we can operate on it
# https://bugreports.qt.io/browse/QTBUG-60673
self._tab.search.clear()
self._tab.run_js_async(
javascript.assemble('caret', 'setPlatform', sys.platform))
self._js_call('setInitialCursor')