padarom / guacamole-common-js

:avocado: The JavaScript Guacamole client library modified for easy installation and usage via npm
http://guac-dev.org/
Apache License 2.0
41 stars 18 forks source link

Mozilla firefox incorrectly calculates remote mouse position #30

Open Ani-21 opened 8 months ago

Ani-21 commented 8 months ago

When launching guacamole-common-js in mozilla firefox, the mouse pointer only reaches the middle of the page. Tried to inspect the behavior and found that the clientY parameter is calculated differently in css transform property. The range of translate function is defined from 657px to 1657px, whereas it should be defined from 0px to 1000px (offset depends on screen resolution). In Chrome browser remote mouse works as expected. On the picture you can see the max clientY that is being reached by guacamole mouse pointer. I'll be glad to recieve any help.

remote-mouse-firefox

Ani-21 commented 7 months ago

It seems that the problem lies with Position.js interface, more specifically with its fromClientPosition method. Body element is defined differently in mozilla compared to other browsers (in other browsers defined as null).

image