[csswg-drafts] [cssom-view] Calling scrollBy() multiple times resets the current scroll operation (#6897)

MAP94 has just created a new issue for https://github.com/w3c/csswg-drafts:

== [cssom-view] Calling scrollBy() multiple times resets the current scroll operation ==
If `scrollBy` is called while a previous call to `scrollBy` is still "running" the current scrolling operation is canceled and a new one is started at the current position. In some cases, this leads to unintuitive behavior and a bad user experience.

In the following example you can click the "Scroll up" and "Scroll down" buttons to scroll up/down by 300px. Each of the colored rectangles are 300px high. If you do a double click on the "Scroll down" button the content is not scrolled by 600px, but some value between 300 and 600. 
https://jsfiddle.net/u21e83rq/1/

I don't know whether this can be fixed, because the observed behavior is implied by the spec: https://drafts.csswg.org/cssom-view/#dom-element-scrollby
```
Add the value of scrollLeft to the left dictionary member.
Add the value of scrollTop to the top dictionary member.
```

It would be nice if the behavior of `scrollBy` would be similar to using the "Page up"/"Page down" keys or clicking in the "track-piece" of the scrollbar. (Doing so will not cancel any previous scroll operations but extend the scroll-animation to the new position)

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6897 using your GitHub account


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

Received on Thursday, 16 December 2021 13:13:41 UTC