Fix scrollbar click bug
This commit is contained in:
parent
295ed2421a
commit
586455bbad
@ -315,9 +315,11 @@ class WebView(QWebView):
|
|||||||
pos = e.pos()
|
pos = e.pos()
|
||||||
frame = self.page_.frameAt(pos)
|
frame = self.page_.frameAt(pos)
|
||||||
if frame is None:
|
if frame is None:
|
||||||
# I don't know why this would happen, but it did.
|
# This happens when we click inside the webview, but not actually
|
||||||
logging.warn("Clicked at {} but frame is None!".format(pos))
|
# on the QWebPage - for example when clicking the scrollbar
|
||||||
return
|
# sometimes.
|
||||||
|
logging.debug("Clicked at {} but frame is None!".format(pos))
|
||||||
|
return super().mousePressEvent(e)
|
||||||
pos -= frame.geometry().topLeft()
|
pos -= frame.geometry().topLeft()
|
||||||
hitresult = frame.hitTestContent(pos)
|
hitresult = frame.hitTestContent(pos)
|
||||||
if self._is_editable(hitresult):
|
if self._is_editable(hitresult):
|
||||||
|
Loading…
Reference in New Issue
Block a user