Also remove 'once' event listeners when destroying (they may still be waiting)

This commit is contained in:
Albin Larsson
2018-06-12 19:43:08 +02:00
parent 53933dff7e
commit 927326f715
4 changed files with 6 additions and 6 deletions

View File

@ -210,7 +210,7 @@ class Listeners {
toggleListener.call(this.player, document.body, 'click', this.toggleMenu, toggle);
// Detect touch by events
once(document.body, 'touchstart', this.firstTouch);
once.call(this.player, document.body, 'touchstart', this.firstTouch);
}
// Container listeners