parent
6eadff4a10
commit
44d26f77a5
@ -1057,6 +1057,22 @@ class WebEngineTab(browsertab.AbstractTab):
|
||||
@pyqtSlot(usertypes.NavigationRequest)
|
||||
def _on_navigation_request(self, navigation):
|
||||
super()._on_navigation_request(navigation)
|
||||
|
||||
if qtutils.version_check('5.11.0', exact=True, compiled=False):
|
||||
# WORKAROUND for https://bugreports.qt.io/browse/QTBUG-68224
|
||||
layout = self._widget.layout()
|
||||
count = layout.count()
|
||||
if count > 1:
|
||||
for i in range(count):
|
||||
item = layout.itemAt(i)
|
||||
if item is None:
|
||||
continue
|
||||
widget = item.widget()
|
||||
if widget is not self._widget.focusProxy():
|
||||
log.webview.debug("Removing widget {} (QTBUG-68224)"
|
||||
.format(widget))
|
||||
layout.removeWidget(widget)
|
||||
|
||||
if not navigation.accepted or not navigation.is_main_frame:
|
||||
return
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user