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

Issue 633317 link

Starred by 3 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Oct 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

The calculation for finding the default top/left of an absolutely positioned element using the nearest positioned ancestor is affected by nearest prior sibling instead

Reported by chase.ma...@gmail.com, Aug 1 2016

Issue description

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

Example URL:
http://output.jsbin.com/vicopowaha/10

Steps to reproduce the problem:
1. Create a relatively positioned div with margin
2. Create an absolutely positioned div with auto top/left
3. Notice that the absolutely positioned div is affected by it's relatively positioned sibling. 

What is the expected behavior?
Only ancestor nodes (not siblings) are expected to be used to calculate the actual value of top:auto; and left:auto for absolutely positioned elements. 

What went wrong?
Chrome is identifying the sibling node as an ancestor node and including it's margin value in the calculation of the absolutely positioned top:auto and left:auto values.

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? No 9.0.3

Chrome version: 51.0.2704.106  Channel: n/a
OS Version: OS X 10.11.3
Flash Version: Shockwave Flash 22.0 r0

https://www.w3.org/TR/css-position-3/#abs-pos
For box offset top (the value of auto): "For absolutely positioned elements whose containing block is based on a block-level element, this property is an offset from the padding edge of that element."
 
Attaching a screenshot of the problem. 
Screen Shot 2016-08-01 at 12.35.27 PM.jpg
75.5 KB View Download
Labels: Needs-Bisect
Cc: rnimmagadda@chromium.org
Components: Blink>Layout
Labels: -Needs-Bisect M-52 OS-Linux OS-Windows
Status: Untriaged (was: Unconfirmed)
Able to repro this issue on Windows 7, MAC (10.11.5) & Ubuntu Trusty (14.04) for Google Chrome Stable Version - 52.0.2743.82

This is a Non-Regression issue existing from M30 - # 30.0.1549.0 [Screen-recording is attached]
633317.mov
3.4 MB Download

Comment 4 by kochi@chromium.org, Aug 2 2016

Components: -Blink
Owner: kochi@chromium.org
Status: Assigned (was: Untriaged)
Looks like this is an layout bug, but could be related to my change
for offsetParent.
Let me take a look.

Comment 5 by kochi@chromium.org, Aug 2 2016

Owner: ----
Status: Available (was: Assigned)
Oops, my change is quite recent and this one seems non-regression, according to comment #3.

Back to layout team.

Comment 6 by ka...@opera.com, Oct 28 2016

Status: WontFix (was: Available)
As far as I can tell, the implementation is correct.  The absolute positioned box should get the "hypothetical static position", as specified here: https://www.w3.org/TR/2011/REC-CSS2-20110607/visudet.html#abs-non-replaced-height






Sign in to add a comment