Remove reader pointerdown listener on close

Avoids a memory leak.
This commit is contained in:
Abe Jellinek 2024-01-16 14:07:57 -05:00 committed by Dan Stillman
parent 2624770cea
commit 57a1214eaa

View file

@ -1025,6 +1025,7 @@ class ReaderTab extends ReaderInstance {
close() {
this._window.removeEventListener('DOMContentLoaded', this._handleLoad);
this._window.removeEventListener('pointerdown', this._handlePointerDown);
this._window.removeEventListener('pointerup', this._handlePointerUp);
if (this.tabID) {
this._window.Zotero_Tabs.close(this.tabID);