-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
You can use |
Beta Was this translation helpful? Give feedback.
-
Unlike mouseover, the mouseenter event does not bubble. This means that if the event occurs on a child element, the mouseenter event handler on the parent element will not be triggered. On the other hand, the mouseover event will bubble from the innermost child element to the outermost parent element. To achieve the effect I want, I switched from using mouseover to mouseenter. Additionally, I have another nested child element inside the element I'm interested in. I set its pointer-events to none so that the mouseenter event would 'pass through' to the layer of the element that I want to detect. This way, I can achieve the desired effect. |
Beta Was this translation helpful? Give feedback.
Unlike mouseover, the mouseenter event does not bubble. This means that if the event occurs on a child element, the mouseenter event handler on the parent element will not be triggered. On the other hand, the mouseover event will bubble from the innermost child element to the outermost parent element. To achieve the effect I want, I switched from using mouseover to mouseenter. Additionally, I have another nested child element inside the element I'm interested in. I set its pointer-events to none so that the mouseenter event would 'pass through' to the layer of the element that I want to detect. This way, I can achieve the desired effect.