chrome does not keep track of page height when using add/removeChild/insertBefore
Reported by
mrgreen...@gmail.com,
Oct 24 2017
|
|||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36 Steps to reproduce the problem: 1. Create a list of items set to display inline-block 2. using js, move the items to the front of the list in sequence. 3. The page will scroll after moving the number of items present in a row What is the expected behavior? The expected behavior is that the page will not scroll. What went wrong? I have items that are displayed as inline-block. I have added the ability to move items around in their container. If I successively move the number of items in a row to the front of the list of items the page will scroll. THIS WORKS PROPERLY IN EDGE... THE PAGE DOES NOT SCROLL WHEN DOING THIS IN EDGE. Did this work before? N/A Does this work in other browsers? N/A Chrome version: 61.0.3163.100 Channel: n/a OS Version: 10.0 Flash Version: IT WORKS IN EDGE.
,
Oct 24 2017
@Reporter: Please attach a sample test file to test this further from chrome TE end. Thanks!
,
Oct 26 2017
scroll down to like the fifth row, then press the move to top button repeatedly, the page will scroll every time the number of items in a row is moved. It scrolls the exact row height so you can just walk down the page pressing the move to top button repeatedly.
,
Oct 26 2017
Thank you for providing more feedback. Adding requester "sc00335628@techmahindra.com" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Oct 26 2017
Thanks for the reproduction URI. This seems related to scroll anchoring and when the last item in a row is removed (ie; it takes 6 clicks on the machine I was using). With scroll anchoring off it doesn't reproduce. skobes@ is this intended behaviour?
,
Oct 26 2017
The item is being removed, then added back at the beginning. So it seems like it would not scroll. The items are moving in a circle from end to beginning and back again through removeChild/insertBefore.
,
Jan 2
Steve, any update on this bug?
,
Jan 3
This is a side effect of scroll anchoring (https://github.com/WICG/ScrollAnchoring/blob/master/explainer.md). When a new item is inserted at the top of the page, the other items reflow. The scroll position is anchored to the first visible item, so when that item is pushed into a new row, there is a downward scroll adjustment to follow it. You can disable this behavior by setting "overflow-anchor: none" on the body element. |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by nyerramilli@chromium.org
, Oct 24 2017