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.
pull/749/head
lilia 10 years ago
parent 1c589f2fad
commit 955ef60292

@ -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',

Loading…
Cancel
Save