Mozilla Firefox: show/hide triggers a mouseover event?
Let's say you have a <div>
element which is hidden.
There is a mouseover event attached to it and the mouse cursor is placed at the location where the <div>
element will appear once it is visible.
How I开发者_如何学JAVA can prevent the mouseover event from firing when the <div>
is made visible?
You can't. The event is fired when the mouse is over a new element in Gecko, whether due to the mouse moving or elements moving. This is quite purposeful; it makes things like CSS :hover
work correctly when the mouse is not moving.
精彩评论