javascriptmousedesktopxulxulrunner

In XUL or JavaScript, is there a way to move the mouse cursor to specified position?


In XUL or JavaScript, is there a way to move the mouse cursor to specified position?


Solution

  • The only time that Gecko moves the mouse is on Windows for the snap-to-default-button effect. This is used by XUL dialogs and wizards. The backend code doesn't actually check that you're giving it a button; any XUL control works. The mouse is moved to the centre of the element, if that point is on-screen, and the window is active. Normally the code checks that the system cursor snapping is enabled, but there is a preference that overrides that.