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

Issue 720366 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Not on Chrome anymore
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Lack of interop for position:fixed when calling getComputedStyle

Project Member Reported by yigu@chromium.org, May 10 2017

Issue description

In the bug ( crbug.com/703816 ) we found that getComputedStyle().top returns wrong value for sticky positioned elements.

According to flackr@:

-----------
It's worth noting the computed style behavior is pretty inconsistent across browsers today:

Computed style of top: auto (test page http://output.jsbin.com/wunoxod/quiet) :

position:   static  relative  sticky   absolute  fixed
Chrome 58   auto    0px       0px      224px     296px
Firefox 53  auto    0px       auto     224px     296px
Edge 14     auto    auto      n/a      auto      auto
Safari 10   auto    auto      auto     auto      auto

For position relative, returning a length or auto has very little difference. For every other position type though, if you were to set the returned length value it would have implications to the layout position. For fixed if you used the bottom value it would now track the viewport size, for absolute it would no longer move with layout, and with sticky it starts moving with scroll.

(https://bugs.chromium.org/p/chromium/issues/detail?id=703816#c13)
-----------

The sticky case is about to work correctly but fixed positioned elements still have interop issues.
 
Labels: Update-Quarterly

Comment 2 by cha...@chromium.org, Sep 14 2017

Components: -Blink>Infra>Predictability

Comment 3 by nainar@chromium.org, Oct 12 2017

Owner: nainar@chromium.org
Status: Started (was: Available)
Seems easy enough to fix. I'll take this on.

Comment 4 by yigu@chromium.org, Oct 12 2017

nainar@, have we agreed on what value it should return? Firefox and Safari behaves differently.

Comment 5 by nainar@chromium.org, Oct 12 2017

I think normalizing to what Safari/Edge is best. Also commented on the bug asking for Tab's opinion. Hopefully he will agree. If so I will submit the change. :) Thanks for checking in on this. 

Comment 6 by nainar@chromium.org, Oct 12 2017

Status: WontFix (was: Started)
Lol looks like it is a wonfix as per Tab's comment in https://github.com/w3c/csswg-drafts/issues/1346/

Comment 7 by phistuck@gmail.com, Oct 13 2017

#6 - it would be great if you made sure issues are filed for non-compliant browsers.

Sign in to add a comment