[cssom-view] Clarify scrollTop/scrollLeft behavior for ongoing smooth scrolls.
Nobody has claimed this yet.
- Dominant language
- Bikeshed
- Stars
- 4.9k
- Forks
- 816
- PR merge metrics
- PR metrics pending
Description
About that line specifically:
Abort any ongoing smooth scroll for box.
Makes sense when setting a 2D position through scrollTo & scrollIntoView, but not as much when setting scrollLeft/Top properties, which most people (and browsers today) would assume to be independent properties.
Specifically, should these two blocks of code behave differently when smooth-scrolling is on than if it isn't:
element.scrollLeft = x;
element.scrollTop = y;
element.scrollTop = y;
element.scrollLeft = x;
It sounds reasonable that both of these should end up [smooth] scrolling to (x,y), but some interpretations of the spec could lead a browser to implement something that would smooth scroll to (0,y) or (x,0) respectively (assuming origin at (0,0)).
Reference mozilla bug where there are questions on the spec: https://bugzilla.mozilla.org/show_bug.cgi?id=1671283
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with cssom-view-1/Overview.bs at the linked line around “Abort any ongoing smooth scroll for box,” then compare the two scrollTop/scrollLeft assignment sequences described in the issue. Review Mozilla bug 1671283 for the implementation questions; done means the specification clearly defines whether each sequence preserves the other coordinate during smooth scrolling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100