Created by: alpadev
Sorry had a little logic error with this.
The old logic was based on relatedTarget
to contain the delegatedTarget
.
This is correct while moving from the parent onto a child element (mouseover
) with the relatedTarget
being the parent element that contains the delegatedTarget
(child). And also while moving from the child onto the parent (mouseout
) with the relatedTarget
being the parent element that contains the delegatedTarget
(child).
So for parent-child relationships this was working totally fine.
The problem comes when moving onto sibling or unconnected elements. The updated logic should handle this properly now, as it checks for the delegatedTarget
not to contain the relatedTarget
. Which is the case for parent (related) -- mouseover --> child (delegated) and parent (related) <-- mouseout -- child (delegated) movements. And also with sibling/unconnected (related) -- mouseover --> listener (delegated) and sibling/unconnected (related) <-- mouseout -- listener (delegated).
Sorry again..