Last active
April 5, 2017 13:34
-
-
Save jlesage/e30c298dbb2c4dd3fe086cdf8aad6ed1 to your computer and use it in GitHub Desktop.
Fix for noVNC 0.6.2 about mouse clicks not working
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- /opt/novnc/include/input.js 2017-04-05 09:24:25.389523205 -0400 | |
+++ /opt/novnc/include/input-new.js 2017-04-05 09:25:03.605331213 -0400 | |
@@ -338,14 +338,13 @@ | |
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 @@ | |
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); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment