diff options
author | Solly Ross <directxman12+github@gmail.com> | 2017-04-12 11:43:12 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-12 11:43:12 -0400 |
commit | 5b78c230f96b23129abc9a067ac9283fe3147c41 (patch) | |
tree | 6fb18da3fd48f1479c6fa1cf024593f0e53134cf | |
parent | e8986fa0692705fa890aed02e08b6844e535eb06 (diff) | |
parent | 4389e1fa07ca1cf6b648f209c5390e14a64c63b4 (diff) | |
download | novnc-stable/v0.6.tar.gz |
Merge pull request #804 from nbibler/backport-619stable/v0.6
Backport #619 into stable/v0.6
-rw-r--r-- | include/input.js | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/include/input.js b/include/input.js index fa6ba44..9f6a4d2 100644 --- a/include/input.js +++ b/include/input.js @@ -338,14 +338,13 @@ var Keyboard, Mouse; Util.addEvent(window, 'touchend', this._eventHandlers.mouseup); Util.addEvent(c, 'touchend', this._eventHandlers.mouseup); Util.addEvent(c, 'touchmove', this._eventHandlers.mousemove); - } else { - Util.addEvent(c, 'mousedown', this._eventHandlers.mousedown); - Util.addEvent(window, 'mouseup', this._eventHandlers.mouseup); - Util.addEvent(c, 'mouseup', this._eventHandlers.mouseup); - Util.addEvent(c, 'mousemove', this._eventHandlers.mousemove); - Util.addEvent(c, (Util.Engine.gecko) ? 'DOMMouseScroll' : 'mousewheel', - this._eventHandlers.mousewheel); } + Util.addEvent(c, 'mousedown', this._eventHandlers.mousedown); + Util.addEvent(window, 'mouseup', this._eventHandlers.mouseup); + Util.addEvent(c, 'mouseup', this._eventHandlers.mouseup); + Util.addEvent(c, 'mousemove', this._eventHandlers.mousemove); + Util.addEvent(c, (Util.Engine.gecko) ? 'DOMMouseScroll' : 'mousewheel', + this._eventHandlers.mousewheel); /* Work around right and middle click browser behaviors */ Util.addEvent(document, 'click', this._eventHandlers.mousedisable); @@ -360,14 +359,13 @@ var Keyboard, Mouse; Util.removeEvent(window, 'touchend', this._eventHandlers.mouseup); Util.removeEvent(c, 'touchend', this._eventHandlers.mouseup); Util.removeEvent(c, 'touchmove', this._eventHandlers.mousemove); - } else { - Util.removeEvent(c, 'mousedown', this._eventHandlers.mousedown); - Util.removeEvent(window, 'mouseup', this._eventHandlers.mouseup); - Util.removeEvent(c, 'mouseup', this._eventHandlers.mouseup); - Util.removeEvent(c, 'mousemove', this._eventHandlers.mousemove); - Util.removeEvent(c, (Util.Engine.gecko) ? 'DOMMouseScroll' : 'mousewheel', - this._eventHandlers.mousewheel); } + Util.removeEvent(c, 'mousedown', this._eventHandlers.mousedown); + Util.removeEvent(window, 'mouseup', this._eventHandlers.mouseup); + Util.removeEvent(c, 'mouseup', this._eventHandlers.mouseup); + Util.removeEvent(c, 'mousemove', this._eventHandlers.mousemove); + Util.removeEvent(c, (Util.Engine.gecko) ? 'DOMMouseScroll' : 'mousewheel', + this._eventHandlers.mousewheel); /* Work around right and middle click browser behaviors */ Util.removeEvent(document, 'click', this._eventHandlers.mousedisable); |