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
[v3] Add failing redirect browser test #5787
[v3] Add failing redirect browser test #5787
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
To add some of my findings to the original issue it seems that the issue is in import { on, trigger } from "@/events"
let isNavigating = false
window.addEventListener('alpine:navigated', () => {
isNavigating = true
// Forward a "livewire" version of the Alpine event...
window.dispatchEvent(new CustomEvent('livewire:navigated', { bubbles: true }))
})
export function shouldRedirectUsingNavigateOr(effects, url, or) {
let forceNavigate = effects.redirectUsingNavigate
if (forceNavigate || isNavigating) {
Alpine.navigate(url)
} else {
or()
}
} the |
Further findings: setTimeout(() => {
fireEventForOtherLibariesToHookInto();
}); which does not appear to be in the livewirejs or alpinejs source anywhere. So it may just be that a recompile of the js assets will fix the issue. setting isNavigating back to false somewhere may be necessary as well though |
@PhiloNL FYI test was failing because you need to add |
Thanks! |
Thanks! Good to know 😄 |
No worries! 🙂 |
I've added a failing test for: #5786