当鼠标按钮按下时,gwt 鼠标悬停事件不会触发
当您按下鼠标左键时,将触发 mouse down 事件。如果您随后将鼠标移动到标签上(同时按住鼠标按钮),则不会触发鼠标悬停事件。
有什么方法可以启用此事件或手动触发它们或模拟它们?
When you push down the left mouse button mouse down event fires. If you then move the mouse over a label (while holding the mouse button down) mouse over event does not fire.
Is there any way to enable this events or fire them manualy or simulate them?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您实际上正在做的是两个单独的事件,一个是您所描述的鼠标按下事件,另一个是鼠标拖动事件。
如果您想模拟它们,您可能必须考虑使用鼠标单击来跟踪用户的 (x,y) 位置。随后,如果您想“模拟”它,您可以进行一些计算并自行决定是否确实发生了鼠标单击或鼠标拖动事件。
希望它有帮助:) 干杯!
What you are actually doing is two separate events, one is a mouse down event as you have described and the other is a mouse drag.
If you want to simulate them, that you might have to consider using a mouse click to track the user's (x,y) location. Subsequently, if you want to "simulate" it you could do some computation and decide for yourself if it is indeed a mouse click or mouse drag event that has occurred.
Hope it helps :) Cheers!