vueuse / motion

🀹 Vue Composables putting your components in motion
https://motion.vueuse.org
MIT License
2.37k stars 82 forks source link

fix: leaving hovered state when pointer hovers child element #194

Closed BobbieGoede closed 5 months ago

BobbieGoede commented 5 months ago

πŸ”— Linked issue

❓ Type of change

πŸ“š Description

Resolves #191

As we are using the 'mouseout' event to detect whether a motion should leave the hovered state it would also get triggered when hovering a child element.

From what I can tell the 'mouseleave' event should be sufficient for this, are there possible use cases for using 'mouseout'?

I'm not quite sure if the test I added will be stable (not flaky) as it uses timeouts to check if the variant/state remains unchanged, this may need to be improved.

πŸ“ Checklist

Tahul commented 5 months ago

well; I think variant feature itself uses timeouts in the background, so using it for testing seems equally okay. :)