-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Might be an Alpine Performance bug on x-show
with transition
#533
Comments
I think there is an old ticket mentioning it. It's a known issue with slow transition or, in your case, fast clicking and it's still unresolved. |
A similar thing was mentioned at the bottom of this thread: #170 |
Yeah, i will definitely take a stab at it. Wanted to make sure if anything new but yeah, i still don't understand why if you remove an inner element with any attribute, it will work fine. Feels to me an overlap thing while walking as well. Oh boy, tough one! |
Yeah there might be some other nasty bug so they may or may not be related. Definitely worth investigating. |
@MuzafferDede is that a real piece of code you use on a website? I had a look at the original code and it's due to the listener on the scroll. Your link (the one where you define x-on:click) points to #last, you added an element using not a generic id but the matching id which means that the browser tries to scroll to that element when clicking a link, this causes the scroll listener to run every time. Since you are reassigning the timeout variable in the handler, you also queue another component refresh which might duplicate the hide part of the transition. Easier said than done, though |
@SimoTod well said. I think it would't be any clear than how you described. I didn't notice i left This is a use case in goal
current logic
I am on still on it. |
@SimoTod I have also updated the server with this new pr fix build, you can check how it works now. |
Tricky one,
https://codepen.io/muzafferdede/pen/XWmLKJx
Screencast:
https://gofile.io/d/0bqt5t
When there is an element with any attribute in
x-show
element, things gets weird.In this example:
Try to click on toggle button quickly multiple times. You will end up with half way done transition.
open
istrue
but transition is not completed.Once you remove
id
on inner element, things are fine. So i guess at some point Alpine doesn't has enough time to complete walking on dom and skip some tasks?The text was updated successfully, but these errors were encountered: