The way “on mouse leave” behaves is a bit problematic in some cases.
Let’s say i have a component that has two states. Default, Active.
Active leads to default on Mouse Leave.
If i set the component to active on a page, as soon as i move the mouse around without even reaching that component the mouse Leave will trigger.
I imagine that it would be more logical given the name of the interaction that Mouse leave triggers only after my mouse was on the component.
Since i haven’t “left” the area because i was never on it.
May be two separate interactions would be interesting :
- On Mouse out (triggers all the time when you’re not on the element)
- On Mouse leave (only triggers after interacting, leaving, with the element).
Right now we’re paining our head on a projet because of this with menu elements that need to be opened and reduce in size after the first interaction. The way it works now forces extra (unnecessary variants).