-
Notifications
You must be signed in to change notification settings - Fork 758
Closed
Labels
enhancement 🦄Changing current behaviour, enhancing what's already thereChanging current behaviour, enhancing what's already there
Description
First of all, thanks for React-Static – it’s great 👏
There’s one undesirable effect, though:
If I scroll down the page and refresh it, after the refresh the page scrolls back to the top with an animation (this can be seen on react-static.js.org). And I expect scroll position to stay exactly where it was before the refresh – that’s how it behaves on browsers out of the box.
I’m aware of props that are available on Router
component, but I was still not able to work around this behaviour:
- If I set
autoScrollToTop={false}
, I lose auto scroll-to-top when the site path changes. Interestingly, it does not fix the scroll-to-top on page refresh, which still happens with this prop off. - If I set
autoScrollToHash={false}
, the issue disappears, but then I lose animated scroll to hash, which some of my pages use. So it seems that scroll to hash is triggered on page refresh and that makes the page scroll back to the top.
Do you agree that this should be fixed?
Metadata
Metadata
Assignees
Labels
enhancement 🦄Changing current behaviour, enhancing what's already thereChanging current behaviour, enhancing what's already there