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 eb46a8509a
commit 6594f62f5d

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):