-
Notifications
You must be signed in to change notification settings - Fork 13
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
v.0.6.0 broke the usual x-target behavior #72
Comments
Thanks for the quick feedback! Sorry, I think you might have found a loophole in v0.5. I'm assuming that the |
I'm afraid it's a , not button! cast2.mp4 |
Ok, thanks for the clarification. I'm wondering if the link
You should see output in the console when loading the page and clicking a link like this:
Thanks for your help! |
Hey, so sorry for the delay, got drowned in work. Anyway, here's what the console said:
Here's the code: |
Also if I'm the only one experiencing this, I think you can safely ignore the bug. I'm not (yet) using this code in any real product, so the impact is minimal. |
No worries! I got this spun up on my machine just now, I'm gonna try to figure out what's going on. Thanks for sharing the repo. |
Ok, so the problem is caused by Astro's View Transitions feature, specifically, this line. When view transitions are enabled, the framework listens for link clicks and navigates to the next page before Alpine AJAX has a chance to perform an AJAX request. If you remove In v0.5 Alpine AJAX registered link click listeners before Astro's click listeners, but in v0.6 we deferred the click listeners so that other libraries have a chance to handle the click event before Alpine AJAX handles it. We made the change to event listeners in v0.6 to support some future client-side routing features, but I might have to rethink that approach to make sure we can stay compatible with frameworks like Astro... |
good catch! I will disable view transitions meanwhile. |
Just wanted to let you know that upgrading from 0.5.1 to 0.6.0 broke things for me. No errors in console, just not working. Am I unlucky? Here's the screencast:
cast.mp4
The text was updated successfully, but these errors were encountered: