Overscroll Behavior not respecting elements with no overflowing content
Reported by
neilto...@gmail.com,
Feb 16 2018
|
||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.167 Safari/537.36 Steps to reproduce the problem: Look at test case here: https://codepen.io/rctneil/pen/rJYONj What is the expected behavior? Document behind should not scroll. Scroll should not propagate from the overlay element to the document behind What went wrong? This is what is described on Google's Blog here: under "The page overlay scenario" EXCEPT, they have the overlay with scrollable content whereas my example doesn't. I may be wrong here but the spec reads "“If a scroll container has no potential to scroll, because it does not overflow in the direction of the scroll, the element is always considered to be at the scroll boundary.” This sounds to me like the scroll should not be propagated whereas currently it is doing so. Did this work before? No Does this work in other browsers? No Using overscroll-behavior on a fixed position element with no overflow, still allows the document behind to scroll Chrome version: 64.0.3282.167 Channel: stable OS Version: OS X 10.13.3 Flash Version:
,
Feb 18 2018
,
Feb 19 2018
Thanks for filing the issue! Able to reproduce the issue on reported chrome version 64.0.3282.167 and on the latest canary 65.0.3350.0 using Windows 10, Ubuntu 14.04 and Mac 10.13.1. As the issue is seen from M60(60.0.3072.0) considering it as Non-Regression and marking it as Untriaged.
,
Feb 22 2018
Majid please triage.
,
Feb 22 2018
,
Feb 23 2018
The overlay element in that page has "overflow: visible" (default value). By definition it is not an scroll container [1]. The passage you are referring to in overscroll specification, talks about *scroll containers* that have no potential to scroll. In this case, the element is no a scroll container. You can fix this easily by using "overflow: hidden" or "overflow: auto" whichever is appropriate. [1] https://drafts.csswg.org/css-overflow-3/#scroll-container
,
Feb 28 2018
As a follow up to this. Actually, by making further updates to the CodePen, If I add overflow: hidden or overflow: auto to the .overlay div, it makes no difference, the scroll is still propagated to the content behind. If I increase the content amount so it no longer fits into the element then the overscroll-behavior comes into effect. Surely, by adding overflow: auto or overflow: hidden to the .overlay then it should work? I just need a way to stop it propagating.
,
Mar 1 2018
That is correct. I can confirm this as well. It seems to be broken for composited scrolling. In particular if I use --disable-threaded-scrolling things appear to work as expected. If I have to guess, if we don't have a composited scrolling layer for the overlay element, cc does not learn about its "overscroll-behavior" which causes it to ignore it. Assigning to sunyunjia@ for further investigation and decision on next step.
,
Mar 14 2018
,
Jul 2
Hello. Did it resolve? I have the same issue on Chrome 67. For example, chatbox demo: https://ebidel.github.io/demos/chatbox.html Let's imagine the situation, when user has just started the chat conversation and left the first message. On the example's page, open DevTools, remove by it all the chat messages except the first message, and try to scroll the chat messages container. The first message height is smaller than the chat messages container height (300px in your example), and scrolling will propogate to body of the page. You can see it on my video: https://youtu.be/5mXAWdmj3jk But this is not what expected. If I set the "overflow" property to "auto" or "scroll" for container, I'm expecting that the container always at "scrollable" state, despite of it's content height. In this situation, when content height is smaller, the container should be at "scroll boundary" state and, when I set "overscroll-behavior" to "contain", the scrolling shouldn't propogate to body. |
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by meh...@chromium.org
, Feb 18 2018