fix stuck webview issue

A race condition could cause domDone to get stuck on false, causing
any further bridge messages and setHtml() calls to be ignored. Fix
the issue by clearing pending actions and resetting domDone when
setting HTML.
This commit is contained in:
Damien Elmes 2019-04-29 16:41:47 +10:00
parent aa1cad76a9
commit 21e842c927

View file

@ -170,6 +170,9 @@ class AnkiWebView(QWebEngineView):
pass
def setHtml(self, html):
# discard any previous pending actions
self._pendingActions = []
self._domDone = True
self._queueAction("setHtml", html)
def _setHtml(self, html):