diff --git a/ext/js/display/display-anki.js b/ext/js/display/display-anki.js index 1ce12b09a..e33789c6a 100644 --- a/ext/js/display/display-anki.js +++ b/ext/js/display/display-anki.js @@ -249,6 +249,7 @@ export class DisplayAnki { this._updateDictionaryEntryDetailsToken = null; this._dictionaryEntryDetails = null; this._hideErrorNotification(false); + this._eventListeners.removeAllEventListeners(); } /** */ diff --git a/ext/js/display/element-overflow-controller.js b/ext/js/display/element-overflow-controller.js index 21a01d9e1..0321b441f 100644 --- a/ext/js/display/element-overflow-controller.js +++ b/ext/js/display/element-overflow-controller.js @@ -115,7 +115,9 @@ export class ElementOverflowController { /** */ clearElements() { this._elements.length = 0; + this._eventListeners.removeAllEventListeners(); this._windowEventListeners.removeAllEventListeners(); + this._dictionaries.clear(); } // Private