Ignore RuntimeError in mouserelease_insertmode.

It seems when clicking certain elements, the webview can get deleted before the
singleShot QTimer will activate.
This commit is contained in:
Florian Bruhin 2015-03-09 11:47:56 +01:00
parent e78fa431c5
commit 9ffb30a16f

View File

@ -268,8 +268,8 @@ class WebView(QWebView):
self._check_insertmode = False self._check_insertmode = False
try: try:
elem = webelem.focus_elem(self.page().currentFrame()) elem = webelem.focus_elem(self.page().currentFrame())
except webelem.IsNullError: except (webelem.IsNullError, RuntimeError):
log.mouse.warning("Element vanished!") log.mouse.warning("Element/page vanished!")
return return
if elem.is_editable(): if elem.is_editable():
log.mouse.debug("Clicked editable element (delayed)!") log.mouse.debug("Clicked editable element (delayed)!")