parent
80778a9ff3
commit
2b6b4e82a7
@ -724,7 +724,13 @@ class AbstractTab(QWidget):
|
|||||||
if getattr(evt, 'posted', False):
|
if getattr(evt, 'posted', False):
|
||||||
raise utils.Unreachable("Can't re-use an event which was already "
|
raise utils.Unreachable("Can't re-use an event which was already "
|
||||||
"posted!")
|
"posted!")
|
||||||
|
|
||||||
recipient = self.event_target()
|
recipient = self.event_target()
|
||||||
|
if recipient is None:
|
||||||
|
# https://github.com/qutebrowser/qutebrowser/issues/3888
|
||||||
|
log.webview.warning("Unable to find event target!")
|
||||||
|
return
|
||||||
|
|
||||||
evt.posted = True
|
evt.posted = True
|
||||||
QApplication.postEvent(recipient, evt)
|
QApplication.postEvent(recipient, evt)
|
||||||
|
|
||||||
|
@ -1104,6 +1104,4 @@ class WebEngineTab(browsertab.AbstractTab):
|
|||||||
self.predicted_navigation.connect(self._on_predicted_navigation)
|
self.predicted_navigation.connect(self._on_predicted_navigation)
|
||||||
|
|
||||||
def event_target(self):
|
def event_target(self):
|
||||||
fp = self._widget.focusProxy()
|
return self._widget.focusProxy()
|
||||||
assert fp is not None
|
|
||||||
return fp
|
|
||||||
|
Loading…
Reference in New Issue
Block a user