Merge remote-tracking branch 'origin/pr/3592'
This commit is contained in:
commit
8b09003bd1
@ -342,7 +342,7 @@ class AbstractCaret(QObject):
|
||||
def _on_mode_entered(self, mode):
|
||||
raise NotImplementedError
|
||||
|
||||
def _on_mode_left(self):
|
||||
def _on_mode_left(self, mode):
|
||||
raise NotImplementedError
|
||||
|
||||
def move_to_next_line(self, count=1):
|
||||
|
@ -223,7 +223,10 @@ class WebEngineCaret(browsertab.AbstractCaret):
|
||||
self._js_call('setInitialCursor')
|
||||
|
||||
@pyqtSlot(usertypes.KeyMode)
|
||||
def _on_mode_left(self):
|
||||
def _on_mode_left(self, mode):
|
||||
if mode != usertypes.KeyMode.caret:
|
||||
return
|
||||
|
||||
self.drop_selection()
|
||||
self._js_call('disableCaret')
|
||||
|
||||
|
@ -205,8 +205,8 @@ class WebKitCaret(browsertab.AbstractCaret):
|
||||
self._widget.page().currentFrame().evaluateJavaScript(
|
||||
utils.read_file('javascript/position_caret.js'))
|
||||
|
||||
@pyqtSlot()
|
||||
def _on_mode_left(self):
|
||||
@pyqtSlot(usertypes.KeyMode)
|
||||
def _on_mode_left(self, _mode):
|
||||
settings = self._widget.settings()
|
||||
if settings.testAttribute(QWebSettings.CaretBrowsingEnabled):
|
||||
if self.selection_enabled and self._widget.hasSelection():
|
||||
|
Loading…
Reference in New Issue
Block a user