Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elements do not return to :initial after leaving the :hovered state #63

Closed
Tracked by #81
abhay-agarwal opened this issue May 17, 2022 · 7 comments · Fixed by #183
Closed
Tracked by #81

Elements do not return to :initial after leaving the :hovered state #63

abhay-agarwal opened this issue May 17, 2022 · 7 comments · Fixed by #183
Labels
bug Something isn't working

Comments

@abhay-agarwal
Copy link

I am wondering if this is intentional or an oversight. With most reactive animation libraries, I typically expect a transition to be reversed when a hovered state is left. Currently, elements respect the :hovered transition, but when the mouse leaves the element, the :initial variant is not re-applied. It would be great if it were, otherwise everything is left "stuck" in the hovered state. This makes it difficult to implement any user-interactive animations. Otherwise, the library looks great

@JonHerbert
Copy link

Same!

@AaronConlon
Copy link

absolutely

@lloyddayekh
Copy link

any updates regarding this issue?

@Tahul Tahul mentioned this issue Sep 11, 2022
13 tasks
@Tahul
Copy link
Member

Tahul commented Sep 11, 2022

Hey, I would need a reproduction for this!

Also, I am really sorry for the late answer.

Here is a link to a sandbox to help: https://stackblitz.com/edit/vue-zj2zpq?file=src%2FApp.vue

You can modify it to your will and showcase what is the exact issue!

@AaronConlon
Copy link

Nice

@leomp12
Copy link
Contributor

leomp12 commented Jan 30, 2023

On my tests it goes back to visible state on mouse leave on Firefox, on Chrome it goes back only if visible and initial are set https://stackblitz.com/edit/vue-eeacxc?file=src/App.vue

@abhay-agarwal
Copy link
Author

On my tests it goes back to visible state on mouse leave on Firefox, on Chrome it goes back only if visible and initial are set https://stackblitz.com/edit/vue-eeacxc?file=src/App.vue

This solution worked for me. Unless there are some other drawbacks to using :visible then I am happy to just use both initial and visible to make interactions reversible! I confirmed that the Firefox solution also works on Mac OS X Safari

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants