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:
Damien Elmes 2018-10-23 16:11:08 +10:00
parent 1af556cb8d
commit fa9a54db98

View File

@ -68,6 +68,9 @@ class AnkiWebPage(QWebEnginePage):
def acceptNavigationRequest(self, url, navType, isMainFrame):
if not isMainFrame:
return True
# data: links generated by setHtml()
if url.scheme() == "data":
return True
from aqt import mw
# ignore href=#
if url.toString().startswith(mw.serverURL()):