Navigation broken in Firefox
Opened this issue · 3 comments
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.
Thanks for the report, I reproduced the bug, I'm fixing it asap
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.
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 😅