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

Navigation broken in Firefox #226

Open
ColonelPhantom opened this issue Mar 13, 2024 · 3 comments · May be fixed by #227
Open

Navigation broken in Firefox #226

ColonelPhantom opened this issue Mar 13, 2024 · 3 comments · May be fixed by #227

Comments

@ColonelPhantom
Copy link

When using Firefox, navigation on component-party is broken. Clicking one of the buttons in the sidebar seems to work occasionally, but usually brings me to the top of page.

Tested on Firefox 123.0.1 and Firefox Nightly 125.0.a1. Seems to work fine in Chromium.

@matschik
Copy link
Owner

Thanks for the report, I reproduced the bug, I'm fixing it asap

@dinnerhe
Copy link
Contributor

dinnerhe commented Apr 4, 2024

It seems that setting a breakpoint on navigate function in Router.svelte gurantees breaks the navigation when clicking the first time. If you click again navigate is not triggered for some reason and works. On chrome navigate is always called by onpopstate when clicking. Also, when I commented out window.onpopstate, navigation on Firefox also works as intended.

@ColonelPhantom
Copy link
Author

In #227 I 'fixed' it by removing scrollTo(0,0) in unsubscribeCurrentRoute which seems to fix the issue. But I'm not sure it's the correct approach 😅

@ColonelPhantom ColonelPhantom linked a pull request Apr 4, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants