diff --git a/qutebrowser/widgets/webview.py b/qutebrowser/widgets/webview.py index 925bd1628..d5b617529 100644 --- a/qutebrowser/widgets/webview.py +++ b/qutebrowser/widgets/webview.py @@ -260,9 +260,7 @@ class WebView(QWebView): elem = frame.findFirstElement( webelem.SELECTORS[webelem.Group.editable_focused]) logging.debug("focus element: {}".format(not elem.isNull())) - if elem.isNull(): - modeman.maybe_leave('insert', 'load finished') - else: + if not elem.isNull(): modeman.enter('insert', 'load finished') @pyqtSlot(str)