mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 21:27:40 +00:00
Fix ticket #114 - mouse position calculated incorrectly.
This commit is contained in:
@@ -111,10 +111,13 @@ Guacamole.Mouse = function(element) {
|
||||
// This is all JUST so we can get the mouse position within the element
|
||||
var parent = element.offsetParent;
|
||||
while (parent) {
|
||||
if (parent.offsetLeft && parent.offsetTop) {
|
||||
|
||||
if (parent.offsetLeft)
|
||||
guac_mouse.currentState.x -= parent.offsetLeft;
|
||||
|
||||
if (parent.offsetTop)
|
||||
guac_mouse.currentState.y -= parent.offsetTop;
|
||||
}
|
||||
|
||||
parent = parent.offsetParent;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user