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:
parent
61017a2e21
commit
fe81da9b8a
@ -300,6 +300,11 @@ class AnkiWebView(QWebEngineView):
|
|||||||
if oldFocus:
|
if oldFocus:
|
||||||
oldFocus.setFocus()
|
oldFocus.setFocus()
|
||||||
|
|
||||||
|
def load(self, url: QUrl):
|
||||||
|
# allow queuing actions when loading url directly
|
||||||
|
self._domDone = False
|
||||||
|
super().load(url)
|
||||||
|
|
||||||
def zoomFactor(self) -> float:
|
def zoomFactor(self) -> float:
|
||||||
# overridden scale factor?
|
# overridden scale factor?
|
||||||
webscale = os.environ.get("ANKI_WEBSCALE")
|
webscale = os.environ.get("ANKI_WEBSCALE")
|
||||||
|
Loading…
Reference in New Issue
Block a user