Open chasenlehara opened 5 years ago
Scroll position restoration is buggy in different browsers.
Here’s the code. I think most of it is unnecessary. https://github.com/canjs/bit-docs-html-canjs/blob/master/static/canjs.js#L334-L362
Below are a few common cases that we should get right. It’d be nice to have tests around these, similar to what we have for the sidebar: https://github.com/canjs/bit-docs-html-canjs/blob/9eefe6a660382b076557d252990d9eae925d26b4/sidebar/test.js#L302-L334
It’s completely broken in Firefox:
When the user clicks on an in-page navigation link, the header for that section should be visible under the sticky header.
It lands on the wrong position in multiple browsers; here’s Firefox:
After refreshing, the user should end up where they scrolled, not back at the old section. I think this is broken in all browsers.
Scroll position restoration is buggy in different browsers.
Here’s the code. I think most of it is unnecessary. https://github.com/canjs/bit-docs-html-canjs/blob/master/static/canjs.js#L334-L362
Below are a few common cases that we should get right. It’d be nice to have tests around these, similar to what we have for the sidebar: https://github.com/canjs/bit-docs-html-canjs/blob/9eefe6a660382b076557d252990d9eae925d26b4/sidebar/test.js#L302-L334
1. Scroll down and refresh the page
It’s completely broken in Firefox:
2. Click on a specific section
When the user clicks on an in-page navigation link, the header for that section should be visible under the sticky header.
3. Refresh after going to a specific section
It lands on the wrong position in multiple browsers; here’s Firefox:
4. Refresh after going to a specific section and scrolling
After refreshing, the user should end up where they scrolled, not back at the old section. I think this is broken in all browsers.