Check if hit test result is null

This commit is contained in:
Florian Bruhin 2014-06-22 23:35:01 +02:00
parent 15126dfb3c
commit ba20300a2c

View File

@ -253,7 +253,9 @@ class WebView(QWebView):
# relative to the QWebView, not to the frame. This makes no sense to
# me, but it works this way.
hitresult = frame.hitTestContent(pos)
if self._is_editable(hitresult):
if hitresult.isNull():
log.mouse.debug("Hitresult is null!")
elif self._is_editable(hitresult):
log.mouse.debug("Clicked editable element!")
modeman.enter('insert', 'click')
else: