solid-start icon indicating copy to clipboard operation
solid-start copied to clipboard

Scroll restoration issues in solid-start docs

Open harshmangalam opened this issue 3 years ago • 2 comments

When i visit What is SolidStart? and scroll to middle of page and after that when i move to Project setup the scroll position is at same place where previous link scroll was. This is happening with all links in docs.

harshmangalam avatar Oct 20 '22 18:10 harshmangalam

I just noticed this as well, it makes me think that I'm being taken to a specific part of the page for a reason, like a fragment, but It's just maintaining the scroll from the previous page.

reggi avatar Oct 25 '22 15:10 reggi

Yeah with our new server routing, this is still a problem, that we haven't solved. It wont be in your apps, but our docs are using our experimental stuff.. We are working on fixing this

nksaraf avatar Oct 30 '22 08:10 nksaraf

If you turn off the islands router and remove all island imports or even switch to csr it still has the same problem. The islands router seems to also have this problem but in the case of the docs it's a separate issue. It seems like the issue is that the router outlet is inside an element with overflow: scroll which messes up both the router's built in scroll to top behavior as well as the browser's built in scroll restoration.

orenelbaum avatar Dec 26 '22 22:12 orenelbaum

Now that we are using MPA islands here it doesn't happen. This issue is largely the way the site is designed. We will look at changing that in the future. But for now the issue isn't present.

ryansolid avatar Mar 06 '24 23:03 ryansolid