Scrolling of child element propagates to parent element
Reported by
rsmith31...@gmail.com,
Apr 9 2016
|
|||||||||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2687.0 Safari/537.36 Example URL: http://www.nytimes.com/2016/04/08/opinion/financial-secrecy-in-panama-and-beyond.html?action=click&pgtype=Homepage&clickSource=story-heading&module=opinion-c-col-left-region®ion=opinion-c-col-left-region&WT.nav=opinion-c-col-left-region&_r=0 Steps to reproduce the problem: 1. Open the New York Times page and click on the comment section (the little icon positioned next to the social media icons) 2. Scroll down really fast and reach the bottom of the comment section. 3. The body of the page will scroll down a bit. What is the expected behavior? Here the child element is the comment section and the body is its parent. The parent shouldn't scroll down after scrolling down the child element. What went wrong? The parent scrolls down a little bit. However, if you scroll down slowly, this issue doesn't occur. Does it occur on multiple sites: Yes Is it a problem with a plugin? No Did this work before? N/A Does this work in other browsers? Yes Chrome version: 51.0.2687.0 Channel: dev OS Version: Ubuntu 15.10 Flash Version: Shockwave Flash 21.0 r0 This (http://i.imgur.com/UL3OdJB.gifv) is a gif showing the issue in the New York Times page. I initially wanted to reproduce the comment section and asked this question (http://stackoverflow.com/questions/36488478/prevent-scrolling-of-child-element-to-propagate-in-angular-2/) on Stack Overflow and subsequently posted my own answer (http://stackoverflow.com/a/36504157/460147) with this demo (http://plnkr.co/edit/dejs2Fo2YjrOK9EiJJve?p=preview) which is presenting the same issue than the NYT page. I tested in Firefox and Chrome (stable and beta) and that demo works okay.
,
Apr 9 2016
This is likely happening because in dev channel the wheel scrolls are being handled on the compositor thread at the same time the next wheel event is being processed.
,
Apr 11 2016
Great to know. Thank you.
,
Apr 14 2016
I can reproduce this as well. #2 is correct that this is an artifact for handling wheel scrolls on compositor. In particular, the scroll offset is not updated on main thread so the handler logic assumes that the wheel event can be handled without overscrolling but in reality on the compositor thread we will overscroll and bubble to scroll the parent. Perhaps this becomes a non-issue once we modify wheel scroll behaviour to latch: http://crbug.com/526463 The logic is trying to prevent scroll bubbling, this becomes unnecessary if we ended up having a method to control bubbling behaviour: http://crbug.com/162179 I am not sure how many people are using such a UI pattern on the web. Perhaps a short-term fix may be for applications to take into account the inflight wheel-delta since last scroll in the calculation.
,
Apr 14 2016
We shouldn't block this on latching, as latching is still a ways out.
,
Apr 15 2016
>I am not sure how many people are using such a UI pattern on the web. Perhaps a short-term fix may be for applications to take into account the inflight wheel-delta since last scroll in the calculation. Do you mean using e.wheelDelta instead of e.deltaY? I tried to change it in the plnkr above, but doesn't seem to work on its own.
,
Apr 18 2016
Assigned to dtapuska@, as this is due to wheel gestures. I'm removing the block on this because wheel latching is still a ways out, and we probably want a shorter term fix here.
,
Apr 18 2016
,
Mar 6 2017
,
Mar 6 2017
Over to sahel@ blocking this on latching since it is quite soon.
,
Apr 24 2018
Wheel scroll latching which is enabled by default since M65 solves this issue. |
|||||||||
►
Sign in to add a comment |
|||||||||
Comment 1 by rsmith31...@gmail.com
, Apr 9 2016