The event is bubbling from the child to the parent (where it is captured)
You must catch the event on the children by adding a listener and stopping the distribution there.
This code will stop the event from bubbling to the parent handler
function onMouseLeave(e)
{
if (!e) var e = window.event;
e.cancelBubble = true;
if (e.stopPropagation) e.stopPropagation();
}
Question: The mouse event is disabled by the parent, if it is not. The mouse above the child should not call the mouse from the parent. How can we stop this?
source
share