New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 832569 link

Starred by 10 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

DevRel-SAP: Unexpected padding-right in RTL when block has a scrollbar

Reported by pavelkor...@gmail.com, Apr 13 2018

Issue description

What is the version of Chrome (chrome://settings/help)?
Version 67.0.3395.0 (Official Build) canary (64-bit)

What is the OS Version?
OSX 10.13.3 (17D47), but the problem is also reproducible on Windows.

What are the steps to reproduce the problem?
1. Create a page in RTL mode;
2. Define custom styling for the scrollbar;
3. Create a block with a scrollbar inside + position relative/absolute;
4. Create an inner block with bigger size to make a scrollbar available in outer block;
5. Create a third block inside the inner block and assign position absolute to it;
6. Observe default behavior - the block is shifted;
7. Set translateX to zero => same behaviour as default - block is shifted;
8. Instead of translateX, set "right: 0" - the block is on the correct position.


What is the expected behavior?
1. no extra padding is added OR possibility to disable/remove this padding via CSS;
2. translateX and "right: 0" calculate coordinates on the ViewPort consistently.


What is the experienced behavior?
In RTL mode, in case when there are custom styles for a scrollbar, Chrome adds extra padding from the right side. Then if there are elements with position absolute/fixed inside, their position calculates based on the adjusted block width and there is no way to remove this padding (see screenshot Chrome.png):

1. "right: 0" works normally
2. "transform: translate(0, 0)" works incorrectly
3. default (without "translate" and "right" specified) works incorrectly

Live demo: https://jsbin.com/vexunetefa/1/edit?html,output


Is the experienced behavior different in other browsers?
Also reproducible in Safari, but other browsers like FireFox, IE11, Edge are fine (see screenshot Edge.png).

 
test.html
1.2 KB View Download
Chrome.png
762 KB View Download
Edge.png
326 KB View Download
Components: -Enterprise Blink
Components: -Blink Blink>Scroll
Labels: OS-Mac OS-Windows
DevTools matches the painted location, so for now assuming this is layout related and not paint related. But we may also be getting the transformed layer in the wrong spot.
Labels: Needs-Triage-M67
Cc: sindhu.chelamcherla@chromium.org
Labels: Triaged-ET M-68 Target-68 FoundIn-68 OS-Linux Pri-2 Type-Bug
Status: Untriaged (was: Unconfirmed)
Able to reproduce this issue on reported version 67.0.3395.0 , on latest stable 66.0.3359.117 and on latest canary 68.0.3399.0 using Windows 10, Mac 10.13.3 and Ubuntu 14.04.

This issue is seen from M-60. Hence considering this issue as Non-Regression and marking as Untriaged.

Comment 5 by bokan@chromium.org, Apr 26 2018

Components: -Blink>Scroll Blink>Layout>Scrollbars

Comment 6 by e...@chromium.org, Apr 30 2018

Owner: szager@chromium.org
Status: Assigned (was: Untriaged)
Is this issue going to be fixed?
Labels: Merge-Request-69 Merge-Request-68
Can this be merged to M68 and/or M69? Thanks.
Project Member

Comment 10 by sheriffbot@chromium.org, Jul 5

Labels: -Merge-Request-69 Merge-Review-69 Hotlist-Merge-Review
This bug requires manual review: We don't branch M69 until 2018-07-19.
Please contact the milestone owner if you have questions.
Owners: amineer@(Android), kariahda@(iOS), cindyb@(ChromeOS), govind@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 11 by sheriffbot@chromium.org, Jul 5

Labels: -Merge-Request-68 Merge-Review-68
This bug requires manual review: M68 has already been promoted to the beta branch, so this requires manual review
Please contact the milestone owner if you have questions.
Owners: cmasso@(Android), kariahda@(iOS), bhthompson@(ChromeOS), abdulsyed@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Merge-Review-69
OK! Removing Merge-Review-69 because it hasn't branched yet.
How safe is this merge? It's been around since M67 seems like, can we wait until M69 then?
It is safe to merge.
Labels: -Merge-Review-68 Merge-Approved-68
Approved -branch:3440
Project Member

Comment 16 by sheriffbot@chromium.org, Jul 16

Cc: marshall@chromium.org abdulsyed@google.com
This issue has been approved for a merge. Please merge the fix to any appropriate branches as soon as possible!

If all merges have been completed, please remove any remaining Merge-Approved labels from this issue.

Thanks for your time! To disable nags, add the Disable-Nags label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Hi,

I believe that issue was not completely fixed. The extra padding for elements with custom scrollbars is still there and you can't control it. You can see it in the Chrome Developer Tools. The positioning of elements with relative/absolute position is correctly calculated now, but there are still cases when the issue occurs. I describe it below:

What is the version of Chrome (chrome://settings/help)?
Both:
Version 68.0.3440.68 (Official Build) beta (64-bit)
Version 70.0.3501.2 (Official Build) canary (64-bit)

What is the OS Version?
macOS 10.13.6
Windows 10 Pro Version 1803

What are the steps to reproduce the problem?
1. Create a page in RTL mode;
2. Define custom styling for the scrollbar;
3. Create a block with a scrollbar inside + position relative/absolute; and add z-index:1; to the block to create a stacking context
4. Create an inner block with bigger size to make a scrollbar available in outer block;
5. Create a third block inside the inner block and assign position: absolute; and will-change: transform; to it
6. Observe default behavior - the block is shifted
7. Remove z-index: 1; from the first block - the third block goes back to its expected position
8. Instead of removing z-index: 1; remove will-change: transform; from the third block - the third block goes back to its original position

What is expected behaviour?
1. No extra padding is added to the container OR possibility to disable/remove this padding via CSS;
2. The position of the third element is calculated consistently when z-index and will-change are applied.

What is the experienced behavior?
In RTL mode, in case when there are custom styles for a scrollbar, Chrome adds extra padding from the right side of the container. If the container has a z-index property and if its children have will-change property, their position is wrongly calculated and off by the extra padding on the container.

Link to demo: [https://jsbin.com/qewobunoka/1/edit?html,output](https://jsbin.com/qewobunoka/1/edit?html,output)

I tested the same code in Firefox and Edge and both browsers don't add the extra padding to the container element.

2018-07-25 at 11.56.png
49.0 KB View Download
2018-07-25 at 11.58.png
49.3 KB View Download
test2.html
911 bytes View Download
Both of your new examples are fixed when running the latest chromium code, most likely by this recent commit:

https://chromium-review.googlesource.com/c/chromium/src/+/1141332

That commit should appear in Chrome canary within a couple of days.
szager, thanks for the update, I will check it out!
#19 - it would be great if you also made sure http://jsfiddle.net/0b5nptt5/ is fixed.
Cc: -abdulsyed@google.com abdulsyed@chromium.org
There seems to be a few issues left. As far as I can see the test case in http://jsfiddle.net/0b5nptt5/ is now fixed though.

But looking at that test case and checking devtools, it will show incorrect position of elements (see attachment).

There is also still an issue with this together with layers or `overflow: overlay`. I'm attaching another test case where this is shown. This is tricky to test in latest Chrome though, as there seems to be a regression for this bug: https://bugs.chromium.org/p/chromium/issues/detail?id=250514 I was testing this in Chromium 68.0.3440.106.
devtools-overlay.png
11.6 KB View Download
test-case-832569.zip
1.3 KB Download

Sign in to add a comment