Skip to content

Commit

Permalink
fix(manager): correctly unbind all events when destroying manager
Browse files Browse the repository at this point in the history
  • Loading branch information
yoannmoinet committed Oct 4, 2015
1 parent d867812 commit e3f96ef
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,12 @@ Manager.prototype.bindEvt = function (el, type) {
// Unbind internal events for the Manager
Manager.prototype.unbindEvt = function (el, type) {
u.unbindEvt(el, toBind[type], handlers[type]);

if (secondBind[type]) {
// Support for both touch and mouse at the same time.
u.unbindEvt(el, secondBind[type], handlers[type]);
}

handlers[type] = undefined;

return this;
Expand Down

0 comments on commit e3f96ef

Please sign in to comment.