mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
don't try set filter if webview already deleted
https://anki.tenderapp.com/discussions/add-ons/32496-add-on-error
This commit is contained in:
parent
1fc480e8f4
commit
eef86bf37e
1 changed files with 4 additions and 4 deletions
|
@ -348,14 +348,14 @@ body {{ zoom: {}; background: {}; {} }}
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def _onBridgeCmd(self, cmd):
|
def _onBridgeCmd(self, cmd):
|
||||||
if not self._filterSet:
|
|
||||||
self.focusProxy().installEventFilter(self)
|
|
||||||
self._filterSet = True
|
|
||||||
|
|
||||||
if self._shouldIgnoreWebEvent():
|
if self._shouldIgnoreWebEvent():
|
||||||
print("ignored late bridge cmd", cmd)
|
print("ignored late bridge cmd", cmd)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if not self._filterSet:
|
||||||
|
self.focusProxy().installEventFilter(self)
|
||||||
|
self._filterSet = True
|
||||||
|
|
||||||
if cmd == "domDone":
|
if cmd == "domDone":
|
||||||
self._domDone = True
|
self._domDone = True
|
||||||
self._maybeRunActions()
|
self._maybeRunActions()
|
||||||
|
|
Loading…
Reference in a new issue