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

[fix] fire navigation-end event only at end of navigation #2649

Merged
merged 1 commit into from
Oct 20, 2021

Conversation

benmccann
Copy link
Member

@benmccann benmccann commented Oct 20, 2021

Fixes the bug portion of #2528. Stops us from firing navigation-end event caused by invalidate or by a redirect during rendering

Also fixes multiple issues with the tests. Need to start listening for navigation-end at the same time we click to avoid race condition. Also need to cancel timeout or else test will fail if the rest of the test takes more than two seconds. Finally, clicknav is to be used only for internal navigation and not navigation that does a server-side nav (e.g. one test was listening for navigation-end when going to google.com, but I'm not sure that makes sense since that site clearly won't fire the event)

@benmccann benmccann added the bug Something isn't working label Oct 20, 2021
@changeset-bot
Copy link

changeset-bot bot commented Oct 20, 2021

🦋 Changeset detected

Latest commit: 487c61c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sveltejs/kit Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@benmccann benmccann merged commit 2db01fb into master Oct 20, 2021
@benmccann benmccann deleted the nav-events branch October 20, 2021 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant