[csswg-drafts] [css-scroll-snap-1] Avoid page scrolling skipping past snappable items (#10914)

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

== [css-scroll-snap-1] Avoid page scrolling skipping past snappable items ==
This originally came up from @johannesodland as a potential issue with scroll-buttons in https://github.com/w3c/csswg-drafts/issues/10722#issuecomment-2353648101 however it's a pre-existing generic issue with scroll-snap, so filing it separately.

When a user pages down, usually by pressing the page-down key, they expect to scroll no further than one page if that is a valid scroll location. However, some browsers can select the next snap point as the target resulting in a scroll of more than a scrollport in length.

E.g. if you have a scrollport height of 1000px, most browsers will try to scroll by 850px. If however the nearest snappable element has a snap alignment that is further, then it can be selected, resulting in scrolls even greater than 1000px and an experience where content has been skipped over - even when that content itself defined a valid snap area. We should fix this so that it's easy to make an experience where 

Codepen demo using page-down key: https://codepen.io/flackr/pen/abgeOKY
Original demo from @johannesodland using `scrollTo` api: https://codepen.io/johannesodland/pen/WNqmoYy

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


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

Received on Wednesday, 18 September 2024 18:53:34 UTC