Smooth scroll preference is ignored for element.scrollIntoView
Categories
(Core :: Layout: Scrolling and Overflow, defect)
Tracking
()
People
(Reporter: matthias, Assigned: dlrobertson)
References
Details
(Keywords: access)
Attachments
(1 file)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:95.0) Gecko/20100101 Firefox/95.0
Steps to reproduce:
I have configured my browser with 'smooth scrolling: disabled', then clicked on an element which triggered an element.scrollIntoView({behaviour: 'smooth'}) action.
Example: clicking 'next' on a comment in an HN thread: https://news.ycombinator.com/item?id=29341390
Actual results:
The window, during some 150ms, smoothly scrolled to the element, whilst adding unwanted extra strain onto my eyes.
Expected results:
The window immediately jumps to the element. The user preferences are used instead of the JS value.
Comment 1•4 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::JavaScript Engine' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
Updated•4 years ago
|
Comment 2•4 years ago
|
||
Hi Matthias,
I tested your issue on the latest Nightly 96.0a1, on Beta 94.0 and currente release 94.0 and I did reproduce it, so I´ll tag this as "New" for visibility.
Let´s wait a for a developer to look into this.
Thanks,
Estanislao
Updated•4 years ago
|
Updated•4 years ago
|
Comment 3•4 years ago
|
||
I moved this to layout, because I think it would make more sense to check the pref there (in PresShell::ScrollContentIntoView?) instead of in every place that we trigger a scroll. If we need to fix it in the DOM API this would be the location instead: https://searchfox.org/mozilla-central/source/dom/base/Element.cpp#761
| Assignee | ||
Updated•3 years ago
|
| Assignee | ||
Comment 4•3 years ago
|
||
For programmatic scrolls, we should respect a users general.smoothScroll
preference. If smooth scrolls are disabled, programmatic scrolls with
behavior: "smooth" should be treated as instant programmatic scrolls.
Comment 6•3 years ago
|
||
Backed out for causing failures at scroll-behavior-3.html.
Backout link: https://hg.mozilla.org/integration/autoland/rev/554741893ce270e952a543e1a929d1451db6d6ad
Failure log: https://treeherder.mozilla.org/logviewer?job_id=406448640&repo=autoland&lineNumber=10996
Comment 9•3 years ago
|
||
Backed out for causing failures on test_group_scrollend.html
- backout: https://hg.mozilla.org/integration/autoland/rev/65df09c42043b91a0ea56b63960e006fdc3e2bb9
- push: https://treeherder.mozilla.org/jobs?repo=autoland&group_state=expanded&selectedTaskRun=PHfVc-XtQMOBi99rI00Atw.0&revision=05981db2f726213a0653b0e83e661c2bb66202c4
- failure log: https://treeherder.mozilla.org/logviewer?job_id=406609241&repo=autoland&lineNumber=8083
[task 2023-02-23T01:49:34.312Z] 01:49:34 INFO - TEST-PASS | gfx/layers/apz/test/mochitest/test_group_scrollend.html | helper_basic_scrollend.html?chrome-only=true | A scrollend event should be triggered after instant scroll
[task 2023-02-23T01:49:34.313Z] 01:49:34 INFO - Buffered messages finished
[task 2023-02-23T01:49:34.314Z] 01:49:34 INFO - TEST-UNEXPECTED-FAIL | gfx/layers/apz/test/mochitest/test_group_scrollend.html | Test timed out. -
[task 2023-02-23T01:49:35.181Z] 01:49:35 INFO - GECKO(2783) | MEMORY STAT | vsize 2590MB | residentFast 172MB | heapAllocated 10MB
[task 2023-02-23T01:49:36.205Z] 01:49:36 INFO - TEST-OK | gfx/layers/apz/test/mochitest/test_group_scrollend.html | took 329740ms
[task 2023-02-23T01:49:39.215Z] 01:49:39 INFO - Error: Unable to restore focus, expect failures and timeouts.
| Assignee | ||
Updated•3 years ago
|
Comment 10•3 years ago
|
||
Comment 11•3 years ago
|
||
| bugherder | ||
Updated•3 years ago
|
Updated•3 years ago
|
Description
•