diff --git a/guacamole-common-js/src/main/resources/mouse.js b/guacamole-common-js/src/main/resources/mouse.js
index <HASH>..<HASH> 100644
--- a/guacamole-common-js/src/main/resources/mouse.js
+++ b/guacamole-common-js/src/main/resources/mouse.js
@@ -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;
         }
Fix ticket #<I> - mouse position calculated incorrectly.