allow the initial setHtml() request to proceed
Qt 5.11 appears to call acceptNavigationRequest() for the initial page load now.
This commit is contained in:
parent
1af556cb8d
commit
fa9a54db98
@ -68,6 +68,9 @@ class AnkiWebPage(QWebEnginePage):
|
|||||||
def acceptNavigationRequest(self, url, navType, isMainFrame):
|
def acceptNavigationRequest(self, url, navType, isMainFrame):
|
||||||
if not isMainFrame:
|
if not isMainFrame:
|
||||||
return True
|
return True
|
||||||
|
# data: links generated by setHtml()
|
||||||
|
if url.scheme() == "data":
|
||||||
|
return True
|
||||||
from aqt import mw
|
from aqt import mw
|
||||||
# ignore href=#
|
# ignore href=#
|
||||||
if url.toString().startswith(mw.serverURL()):
|
if url.toString().startswith(mw.serverURL()):
|
||||||
|
Loading…
Reference in New Issue
Block a user