Honor general.smoothScroll pref on `GoToAnchor` etc.
Categories
(Core :: Layout: Scrolling and Overflow, defect, P2)
Tracking
()
People
(Reporter: erwinm, Assigned: dlrobertson)
References
Details
Steps to reproduce:
I turn ui.prefersReducedMotion on (1) and general.smoothScroll off (false), because "smooth" and "ease" effects give me nasty migraines. Many
-
Open about:preferences, search for scroll, turn smooth scroll and autoscroll off.
-
Visit this site, mentioned in bug 279629: https://www.kryogenix.org/code/browser/smoothscroll
-
Select any of the anchors on the page.
Actual results:
- Animated scrolling, pain.
Expected results:
- Instant jump.
Possibly regressed by bug 1010538, but the old versions just crash, without letting me test anything.
Comment 1•2 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Panning and Zooming' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•2 years ago
|
||
Just to follow up your post on Reddit, I'm not sure if anchor navigation is the only issue on Google Docs. I noticed that PgUp/PgDn also scrolls smoothly regardless of accessibility/scroll settings. Are you able to reproduce that too?
Updated•2 years ago
|
Updated•2 years ago
|
Becauseof the migraines, and the lack of an adequate workaround, I think S2 makes more sense than S3.
Comment 5•2 years ago
|
||
Discussed with APZ team:
- Raising priority to P2
- Added this to our upcoming stabilization sprint
- When fixing, will see if the related bugs bug 1743045 and bug 1753565 can be fixed at the same time
Updated•2 years ago
|
Assignee | ||
Comment 6•2 years ago
|
||
Started looking into this, and I'm not sure how we'd address this for https://www.kryogenix.org/code/browser/smoothscroll. As seen in https://www.kryogenix.org/code/browser/smoothscroll/smoothscroll.js, the author manually implements the animated scroll. For bug 1743045, we can choose to perform an instant scrollIntoView, but here the author performs several instant scrolls to simulate a smooth scroll. Am I misunderstanding the purpose of this issue or misreading the intent of the example page?
Comment 7•2 years ago
|
||
It's possible that the bug title has become out of sync with the original issue that motivated the report.
In our discussion mentioned in comment 5, I was going by the bug title, which referenced GoToAnchor
, our internal function used when navigating to an anchor link. It should be fairly straightforward to make sure that the scrolling performed in that function respects the general.smoothScroll
preference if it doesn't already.
A page that simulates a smooth scroll with multiple instant scrolls in JS is a different matter. In that case, I don't think there's any mitigation we can deploy on the browser side; all we can do is suggest that our WebCompat team reach out to the page authors and encourage them to respect the prefers-reduced-motion
media query (which can be checked from JS) when writing such effects.
Assignee | ||
Comment 8•2 years ago
|
||
Thanks for the explanation. GoToAnchor
will call ScrollToShowRect, which should eventually call ScrollToShowRect, which was recently changed to honor general.smoothScroll
with this change that was suggested by Hiro. Basic anchor link tests I've run locally do not trigger smooth scrolling, so I think this can be resolved as a duplicate of bug 1743045.
Comment 9•2 years ago
|
||
Though I do always wonder whether we should duplicate or not in such cases, in this specific case I'd rather keep this bug separate since GoToAnchor
is a slightly different functionality. Anyway, thanks Dan, great work!
Updated•2 years ago
|
Description
•