Enable caret only when mode is 'caret'

This commit is contained in:
Artur Shaikhullin 2018-01-06 22:43:39 +06:00
parent dc8c919c30
commit c4e50369e7

View File

@ -202,6 +202,9 @@ class WebEngineCaret(browsertab.AbstractCaret):
@pyqtSlot(usertypes.KeyMode)
def _on_mode_entered(self, mode):
if mode != usertypes.KeyMode.caret:
return
self._tab.run_js_async(
javascript.assemble('caret', 'setInitialCursor',
platform.platform()))