component-party.dev icon indicating copy to clipboard operation
component-party.dev copied to clipboard

Navigation broken in Firefox

Open ColonelPhantom opened this issue 1 year ago • 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.

ColonelPhantom avatar Mar 13 '24 06:03 ColonelPhantom

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

matschik avatar Mar 13 '24 09:03 matschik

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.

dinnerhe avatar Apr 04 '24 03:04 dinnerhe

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 :sweat_smile:

ColonelPhantom avatar Apr 04 '24 13:04 ColonelPhantom