Backport #619 into stable/v0.6

This commit is contained in:
Nathaniel Bibler 2017-03-31 15:16:40 -04:00
parent e8986fa069
commit 4389e1fa07
No known key found for this signature in database
GPG Key ID: 926026BEEFB6AE7C
1 changed files with 12 additions and 14 deletions

View File

@ -338,14 +338,13 @@ var Keyboard, Mouse;
Util.addEvent(window, 'touchend', this._eventHandlers.mouseup); Util.addEvent(window, 'touchend', this._eventHandlers.mouseup);
Util.addEvent(c, 'touchend', this._eventHandlers.mouseup); Util.addEvent(c, 'touchend', this._eventHandlers.mouseup);
Util.addEvent(c, 'touchmove', this._eventHandlers.mousemove); Util.addEvent(c, 'touchmove', this._eventHandlers.mousemove);
} else { }
Util.addEvent(c, 'mousedown', this._eventHandlers.mousedown); Util.addEvent(c, 'mousedown', this._eventHandlers.mousedown);
Util.addEvent(window, 'mouseup', this._eventHandlers.mouseup); Util.addEvent(window, 'mouseup', this._eventHandlers.mouseup);
Util.addEvent(c, 'mouseup', this._eventHandlers.mouseup); Util.addEvent(c, 'mouseup', this._eventHandlers.mouseup);
Util.addEvent(c, 'mousemove', this._eventHandlers.mousemove); Util.addEvent(c, 'mousemove', this._eventHandlers.mousemove);
Util.addEvent(c, (Util.Engine.gecko) ? 'DOMMouseScroll' : 'mousewheel', Util.addEvent(c, (Util.Engine.gecko) ? 'DOMMouseScroll' : 'mousewheel',
this._eventHandlers.mousewheel); this._eventHandlers.mousewheel);
}
/* Work around right and middle click browser behaviors */ /* Work around right and middle click browser behaviors */
Util.addEvent(document, 'click', this._eventHandlers.mousedisable); Util.addEvent(document, 'click', this._eventHandlers.mousedisable);
@ -360,14 +359,13 @@ var Keyboard, Mouse;
Util.removeEvent(window, 'touchend', this._eventHandlers.mouseup); Util.removeEvent(window, 'touchend', this._eventHandlers.mouseup);
Util.removeEvent(c, 'touchend', this._eventHandlers.mouseup); Util.removeEvent(c, 'touchend', this._eventHandlers.mouseup);
Util.removeEvent(c, 'touchmove', this._eventHandlers.mousemove); Util.removeEvent(c, 'touchmove', this._eventHandlers.mousemove);
} else { }
Util.removeEvent(c, 'mousedown', this._eventHandlers.mousedown); Util.removeEvent(c, 'mousedown', this._eventHandlers.mousedown);
Util.removeEvent(window, 'mouseup', this._eventHandlers.mouseup); Util.removeEvent(window, 'mouseup', this._eventHandlers.mouseup);
Util.removeEvent(c, 'mouseup', this._eventHandlers.mouseup); Util.removeEvent(c, 'mouseup', this._eventHandlers.mouseup);
Util.removeEvent(c, 'mousemove', this._eventHandlers.mousemove); Util.removeEvent(c, 'mousemove', this._eventHandlers.mousemove);
Util.removeEvent(c, (Util.Engine.gecko) ? 'DOMMouseScroll' : 'mousewheel', Util.removeEvent(c, (Util.Engine.gecko) ? 'DOMMouseScroll' : 'mousewheel',
this._eventHandlers.mousewheel); this._eventHandlers.mousewheel);
}
/* Work around right and middle click browser behaviors */ /* Work around right and middle click browser behaviors */
Util.removeEvent(document, 'click', this._eventHandlers.mousedisable); Util.removeEvent(document, 'click', this._eventHandlers.mousedisable);