Fix list_view-related error in background page
Background page conversations were trying to trigger events on the inbox list view which had been destroyed, resulting in a background page console error of "can't read innerHeight of null". Avoid this by removing listeners when the inbox window is closed.
This commit is contained in:
parent
1c589f2fad
commit
955ef60292
1 changed files with 3 additions and 0 deletions
|
@ -35,6 +35,9 @@
|
||||||
}).render();
|
}).render();
|
||||||
|
|
||||||
window.addEventListener('resize', this.inbox.resize.bind(this.inbox));
|
window.addEventListener('resize', this.inbox.resize.bind(this.inbox));
|
||||||
|
window.addEventListener('beforeunload', function () {
|
||||||
|
this.inbox.stopListening();
|
||||||
|
}.bind(this));
|
||||||
},
|
},
|
||||||
events: {
|
events: {
|
||||||
'keyup': 'keyup',
|
'keyup': 'keyup',
|
||||||
|
|
Loading…
Reference in a new issue