children element under fixed height element remove affect parent's parent scrollTop value
Reported by
smith3...@gmail.com,
Aug 1
|
|||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36 Steps to reproduce the problem: Here is the reproduce link: https://codepen.io/zombieJ/pen/XBEmKZ 1. click remove button 2. you can see the scrollTop value changed What is the expected behavior? Since the dom element including children element has fixed height. Parent scrollTop should not affect by the children element update. What went wrong? Children under fixed height element remove affect outside dom element scrollTop Did this work before? N/A Chrome version: 67.0.3396.99 Channel: stable OS Version: OS X 10.13.6 Flash Version: Tried Firefox & safari. They are OK.
,
Aug 2
,
Aug 2
This is intentional and due to the "scroll anchoring" feature where the scroll position is determined based on the visible elements rather than the absolute offset from the top. See https://blog.chromium.org/2017/04/scroll-anchoring-for-web-developers.html and https://drafts.csswg.org/css-scroll-anchoring/ for details. You may use "overflow-anchor: none" to disable this behavior. See https://codepen.io/anon/pen/ajGGvP for a modified version of your repro. Thanks for the report. |
|||
►
Sign in to add a comment |
|||
Comment 1 by swarnasree.mukkala@chromium.org
, Aug 1