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:
lilia 2015-02-18 11:23:13 -08:00
parent 1c589f2fad
commit 955ef60292

View file

@ -35,6 +35,9 @@
}).render();
window.addEventListener('resize', this.inbox.resize.bind(this.inbox));
window.addEventListener('beforeunload', function () {
this.inbox.stopListening();
}.bind(this));
},
events: {
'keyup': 'keyup',