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

Skip transitions when visibility does not change #160

Conversation

SimoTod
Copy link
Collaborator

@SimoTod SimoTod commented Feb 3, 2020

Closes #159

Every time something changes, Alpine reevaluates each x-show directive and applies the transition classes again, causing a quick flickering in some browsers (I.e. Firefox).
This PR update Alpine so it will skip the transition calls when the visibility of an element hasn't changed.

@calebporzio
Copy link
Collaborator

Thanks @SimoTod!!

@calebporzio calebporzio merged commit 6fce379 into alpinejs:master Feb 4, 2020
@SimoTod SimoTod deleted the bug/transitions-when-visibility-does-not-change branch November 20, 2021 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

x-transition fires even if x-show/x-if state didn't change.
2 participants