New issue
Advanced search Search tips

Issue 799456 link

Starred by 3 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 3
Type: Bug



Sign in to add a comment

overflow: overlay scroll bars styled with CSS clip the content

Reported by kogg...@spotify.com, Jan 5 2018

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36

Steps to reproduce the problem:
1. Load http://jsfiddle.net/35huq3ah/
2. Observe the rendered result

What is the expected behavior?
First example should be covered in blue, since the blue element has a `z-index` to be on top of the red element, and the red element is on top of the scrollable area, so that covers the scroll bar too.

Second example makes the scrollable area a stacking context, which means the blue element no longer should be on top of the red element. The scroll bar should still be rendered on top of the blue element though.

What went wrong?
The content inside the scrollable area is clipped where the scroll bar is (even if it's an overlay scroll bar). The background is not clipped, only the content. When the content is clipped, the scroll bar and the red element shows through on the right side in the first example. In the second example the content should show through behind the scroll bar, but since it's clipped it doesn't.

Did this work before? No 

Does this work in other browsers? No
 The behavior in Safari is the same as Chrome, I guess the overlay scroll bars were implemented in WebKit to start with and then the same problem was brought over to Blink.

Chrome version: 63.0.3239.84  Channel: stable
OS Version: OS X 10.13.2
Flash Version: 

I have a fix as well, although I'm not sure if it has other implications. I will push it up for review to discuss it there.
 
current-issue.png
383 KB View Download
with-a-fix.png
417 KB View Download

Comment 1 by e...@chromium.org, Jan 7 2018

Labels: -Pri-2 Pri-3
Status: Available (was: Unconfirmed)

Comment 2 by kogg...@spotify.com, Apr 17 2018

I tried pushing my fix, but it turned out it wasn't that easy and had issues with Z order being different on different screens (retina vs non-retina).

For full context, check out the CL here: https://chromium-review.googlesource.com/c/chromium/src/+/852533

I'm hoping someone else can chip in at some point and get a fix in for this! :) Thanks!
Cc: mstensho@chromium.org e...@chromium.org

Sign in to add a comment