[css-scroll-snap] when element with scroll snapping or child with scroll-snap-align set change dimensions, previously snapped(anchored) element is no longer snapped.
Reported by
h...@jonjohnjohnson.com,
Apr 26 2018
|
|||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3404.0 Safari/537.36 Steps to reproduce the problem: 1. Go to text case -> http://jsbin.com/subojom/11 2. Notice how it uses viewport units to size "panels" within the scroll snapping which fills the screen. 3. Scroll vertically to whatever "panel" you desire 4. Resize the height of your browser. 5. See how the scroll position of the scrolling element is no longer to the last element it was previously snapped, sitting at an "arbitrary" scroll position. What is the expected behavior? https://www.w3.org/TR/css-scroll-snap-1/#captures-snap-positions "If the content or layout of the document changes (e.g. content is added, moved, deleted, resized) such that the content of a snapport changes, the UA must re-evaluate the resulting scroll position, and re-snap if required. If the scroll container was snapped before the content change and that same snap position still exists (e.g. its associated element was not deleted), the scroll container must be re-snapped to that same snap position after the content change." What went wrong? Both dimensions of the scrolling element AND dimensions of snapped element change on resize, causing snapping to be lost. Did this work before? No Does this work in other browsers? N/A Chrome version: 68.0.3404.0 Channel: canary OS Version: OS X 10.12.6 Flash Version: I know this is a tricker case of snap position recalculation, in its use of viewport units, resizing the window, and resizing snapped elements, but figured it could cover a lot of bases.
,
Apr 26 2018
Over to sunyunjia@ to triage.
,
Oct 2
|
|||
►
Sign in to add a comment |
|||
Comment 1 by krajshree@chromium.org
, Apr 26 2018