在XUL或JavaScript中,是否可以将鼠标光标移动到指定位置?

在XUL或JavaScript中,是否可以将鼠标光标移动到指定位置?

问题描述:

在XUL或JavaScript中,是否可以将鼠标光标移动到指定位置?

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

壁虎唯一一次移动鼠标的动作是在Windows上实现默认按钮的效果. XUL 对话框和向导.后端代码实际上并不会检查您是否给它提供了一个按钮.任何XUL 控制均可使用.如果该点在屏幕上,并且该窗口处于活动状态,则将鼠标移到元素的中心.通常,代码会检查是否启用了系统光标捕捉功能,但是有一个优先选项可以覆盖该功能.

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.