开发者

GWT set cursor to a position (x,y)

开发者 https://www.devze.com 2023-03-15 12:41 出处:网络
in GWT, Is it pos开发者_JAVA百科sible to set the cursor position to a location (x,y) (top,left) ??Are you referring to the mouse cursor?If so, browsers don\'t provide an API for setting the position o

in GWT, Is it pos开发者_JAVA百科sible to set the cursor position to a location (x,y) (top,left) ??


Are you referring to the mouse cursor? If so, browsers don't provide an API for setting the position of the mouse cursor.

If you're talking about a text insertion caret in a TextArea or similar widget, you can use TextBoxBase.setCursorPos() to set the caret to a particular offset within the text.


Setting mouse cursor is not possible in JS, due to security. Think of entering a site which suddenly starts to move your mouse for you ... and possibly click ads on this site. Would you add such feature to browser?

0

精彩评论

暂无评论...
验证码 换一张
取 消