-
Notifications
You must be signed in to change notification settings - Fork 935
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
JS.show() race condition #3456
Comments
Hey @silverdr, thank you for reporting! It would be helpful if you could provide a sample script to reproduce the problem. I cannot currently say if your quick fix has any consequences on transition based animations, so I'd need to experiment a little bit myself. A reproduction would help a lot, but I can try to come up with one myself when I find the time :) |
@SteffenDE I apologise for the delayed response. I must have overlooked notification :-( Yes, I can prepare a more detailed example shortly but FWIW the problem is already visible when following the documentation examples as described in the linked Elixir forum thread. The trigger in my case is only a bit different but it doesn't make any change in behaviour:
As for the pull request – it shows what change "fixed" the problem at hand but the disclaimer obviously applies ;-) |
Here comes the example. If you need anything else, please ping me back.
Video of the results: |
@chrismccord please let me know if I can help more with this one. Regards. |
Environment
Actual behavior
When using JS.show() with animated transition
sometimes the element pops-up BEFORE the transition animation starts, then disappears and only then animates. Video showing the problem:
https://cld.silverdr.com/s/z8KbZkCDGw8Ffyx
Expected behavior
The transition flow is undisturbed every time.
The relevant elixirforum thread:
https://elixirforum.com/t/liveview-js-show-hide-race-condition/66405/
The Pull Request with a quick fix.
#3455
Please note that I am not familiar with the codebase so can't guarantee that it is the most "correct" way to deal with the problem.
The text was updated successfully, but these errors were encountered: