-
-
Notifications
You must be signed in to change notification settings - Fork 196
Open
Labels
help wantedExtra attention is neededExtra attention is needed
Description
waku/packages/waku/src/router/client.tsx
Lines 893 to 904 in a685fc1
| useEffect(() => { | |
| const callback = () => { | |
| const route = parseRoute(new URL(window.location.href)); | |
| changeRoute(route, { shouldScroll: true }).catch((err) => { | |
| console.log('Error while navigating back:', err); | |
| }); | |
| }; | |
| window.addEventListener('popstate', callback); | |
| return () => { | |
| window.removeEventListener('popstate', callback); | |
| }; | |
| }, [changeRoute]); |
If scroll is not reset here, the browser will automatically restore the scrolling position, which is in line with the general behavior of browsers.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
help wantedExtra attention is neededExtra attention is needed