Make sure to set domDone to False before loading URLs

Fixes an issue where JS would be evaluated prematurely in views
directly loaded from URLs.
This commit is contained in:
Glutanimate 2020-07-16 19:56:57 +02:00
parent 61017a2e21
commit fe81da9b8a

View File

@ -300,6 +300,11 @@ class AnkiWebView(QWebEngineView):
if oldFocus:
oldFocus.setFocus()
def load(self, url: QUrl):
# allow queuing actions when loading url directly
self._domDone = False
super().load(url)
def zoomFactor(self) -> float:
# overridden scale factor?
webscale = os.environ.get("ANKI_WEBSCALE")