Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Firefox on Windows 10] TOC links don't fully scroll to section #150

Open
alankemp opened this issue Aug 17, 2020 · 5 comments
Open

[Firefox on Windows 10] TOC links don't fully scroll to section #150

alankemp opened this issue Aug 17, 2020 · 5 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@alankemp
Copy link
Contributor

When I click on a link in the table of contents, say on this page:
https://workers.cloudflaredocs.workers.dev/learning/getting-started

It doesn't fully scroll to the section I selected. To get to "7. Publish your project" I had to click the TOC link four or five times, each time taking me a bit further down the page.

I'm running the latest Firefox on Windows 10.

@alankemp
Copy link
Contributor Author

I just tried Chrome and see very different behaviour. In Chrome it smoothly scrolls right to the section. Firefox "jumps" rather than scrolls and doesn't go far enough.

@adamschwartz adamschwartz changed the title TOC links don't fully scroll to section [Firefox on Windows 10] TOC links don't fully scroll to section Aug 17, 2020
@adamschwartz adamschwartz added bug Something isn't working help wanted Extra attention is needed labels Aug 17, 2020
@adamschwartz adamschwartz added this to the Post-launch cleanup milestone Aug 19, 2020
@ObsidianMinor
Copy link
Contributor

This is also present with Firefox on Linux.

@adamschwartz
Copy link
Contributor

@alankemp Or anyone else able to test Firefox on Windows 10/Linux:

I have a suspicion that this has to do with the native CSS scroll-behavior: smooth being applied.

To test this, I’d love folk’s help. If you set prefers-reduced-motion: reduce in your operating system or in your browser, that will prevent this CSS from being applied. With this off, if the issue goes away, that could suggest that this may be a browser bug in Firefox’s implementation of scroll-behavior: smooth. If the issue persists, that would be surprising to me, but it would also be very helpful for further debugging.

According to this article, Firefox gets this preference from Windows directly:

By making CSS animation conditional on prefers-reduced-motion, websites can respect a user’s operating system animation setting. In Windows 10, that setting is Windows Settings > Ease of Access > Display > Show animations in Windows.

In iOS 12, you unintuitively turn on two switches to turn off animation: Settings > Safari > Advanced > Experimental Features > Web Animations and CSS Integration and Web Animations.

Let me know. :)

@ObsidianMinor
Copy link
Contributor

I can confirm on Linux, setting ui.prefersReducedMotion to 1 in about:config fixes it.

@alankemp
Copy link
Contributor Author

Yes, confirmed on Windows 10 as well. Setting Windows Settings > Ease of Access > Display > Show animations in Windows to false makes it snap immediatly to the section.

@adamschwartz adamschwartz modified the milestones: Post-launch cleanup, Engine enhancements Sep 23, 2020
@adamschwartz adamschwartz removed this from the Engine enhancements milestone Oct 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants