Make hitTestResult work with frames correctly
This commit is contained in:
parent
4eebe2dc57
commit
31a1e91866
2
TODO
2
TODO
@ -77,8 +77,6 @@ Bugs
|
||||
|
||||
- Hinting problems on http://wiki.gentoo.org/wiki/Lenovo_ThinkPad_T440s (top navbar, e.g. lists, etc.)
|
||||
|
||||
- clicking on text fields at https://bugreports.qt-project.org/secure/Dashboard.jspa doesn't go into insert mode. (because of iframes?)
|
||||
|
||||
- scroll_page doesn't care about always visible bars, so content gets hidden
|
||||
e.g. http://www.mtb-news.de/forum/t/welcher-schuh-five-ten-vs-oneal.529148/
|
||||
|
||||
|
@ -358,7 +358,10 @@ class WebView(QWebView):
|
||||
# sometimes.
|
||||
logging.debug("Clicked at {} but frame is None!".format(pos))
|
||||
return super().mousePressEvent(e)
|
||||
pos -= frame.geometry().topLeft()
|
||||
# You'd think we have to subtract frame.geometry().topLeft() from the
|
||||
# position, but it seems QWebFrame::hitTestContent wants a position
|
||||
# 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):
|
||||
logging.debug("Clicked editable element!")
|
||||
|
Loading…
Reference in New Issue
Block a user