Release mouse buttons if mouse leaves browser window.
This commit is contained in:
1 parent
0eb351e467
commit
00d4cf6858
1 file changed
+15
@@ -112,6 +112,21 @@ function GuacamoleMouse(element) {
|
||||
buttonReleasedHandler(getMouseState(0, 0));
|
||||
};
|
||||
|
||||
element.onmouseout = function(e) {
|
||||
|
||||
e.stopPropagation();
|
||||
|
||||
// Release all buttons
|
||||
if (mouseLeftButton || mouseMiddleButton || mouseRightButton) {
|
||||
mouseLeftButton = 0;
|
||||
mouseMiddleButton = 0;
|
||||
mouseRightButton = 0;
|
||||
|
||||
buttonReleasedHandler(getMouseState(0, 0));
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Override selection on mouse event element.
|
||||
element.onselectstart = function() {
|
||||
return false;
|
||||
|
||||
Reference in new issue
Block a user