Re: [csswg-drafts] [cssom] newly performed scroll should only abort smooth scroll in the same axis (#13925)

I think as a developer I would expect methods that set scroll left or scroll top (e.g. `scrollLeft=`, `scrollTo({left: )`) to behave similar to setting `left/top` on an element with a transition-duration on left and top. I'd be concerned about jumping immediately to the end. I think when setting left/top it should update that parameter of the animation target. See also #5679 which looks like the same issue.

This gets more complicated when we consider relative scrolls, user input and user expectations around that.

For relative scrolls and relative input:
1. If I press page down twice, I expect to go down two pages, but currently the second press interrupts the first smooth scroll. In a scroll snap carousel, if i press right arrow twice I expect it to jump two snap positions regardless of whether I pressed it quickly or slowly. This is analogous to the scrollBy issue #6897. I think when doing a **relative scroll** in the **same direction** as the ongoing smooth scroll, I would expect it to adjust the end position. 
2. If I have an ongoing smooth scroll and I scroll in the **opposite** direction, I think I expect it to interrupt from the current position rather than adjust the eventual target.

For absolute user input:
1. If I press home after a smooth scroll to the right, should it continue the smooth scroll to the right and adjust it to scroll to the top as well? Maybe? That would be in my mind most consistent with the initial point.

-- 
GitHub Notification of comment by flackr
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/13925#issuecomment-5047757086 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 22 July 2026 14:56:43 UTC