Handle multiple visible children when finding lost focusProxy
When we click a QTBUG link (to open in a new tab) from Qt's codereview, we get two RWHV objects which both are visible. Experimenting with .setEnabled(False) it looks like it's (hopefully always...) the last one which is the one to use.
This commit is contained in:
parent
c328d54ebe
commit
67c67db230
@ -79,11 +79,7 @@ class WebEngineView(QWebEngineView):
|
||||
log.webview.debug("Found possibly lost focusProxy: {}"
|
||||
.format(children))
|
||||
|
||||
if not children:
|
||||
return None
|
||||
|
||||
assert len(children) == 1, children
|
||||
return children[0]
|
||||
return children[-1] if children else None
|
||||
|
||||
def shutdown(self):
|
||||
self.page().shutdown()
|
||||
|
Loading…
Reference in New Issue
Block a user