Use existing selection when entering caret mode.
This commit is contained in:
parent
5cf1dce89e
commit
e459ac52cc
@ -460,7 +460,7 @@ class WebView(QWebView):
|
|||||||
elif mode == usertypes.KeyMode.caret:
|
elif mode == usertypes.KeyMode.caret:
|
||||||
settings = self.settings()
|
settings = self.settings()
|
||||||
settings.setAttribute(QWebSettings.CaretBrowsingEnabled, True)
|
settings.setAttribute(QWebSettings.CaretBrowsingEnabled, True)
|
||||||
self.selection_enabled = False
|
self.selection_enabled = bool(self.page().selectedText())
|
||||||
|
|
||||||
if self.isVisible():
|
if self.isVisible():
|
||||||
# Sometimes the caret isn't immediately visible, but unfocusing
|
# Sometimes the caret isn't immediately visible, but unfocusing
|
||||||
|
Loading…
Reference in New Issue
Block a user