Skip to content

position:absolute are not stacked properly if another elements is position:fixed #7166

Closed

Description

@paulrouget
<div style="position:absolute;z-index:2;width:100px;height:100px;background:red"></div>
<div style="position:absolute;z-index:1;top:50px;left:50px;height:100px;width:100px;height:100px;background:green"></div>
<div style="position:fixed;"></div>

Without the last div, the 2 first divs are stacked according to their z-index. Whit the last div, the 2 first divs are stacked according to their position in the DOM.

screen shot 2015-08-12 at 11 38 11

Activity

  1. waddlesplash commented on Aug 14, 2015

    @waddlesplash

    @jdm: Shouldn't this also have I-wrong too?

  2. added
    I-wrong
    on Aug 14, 2015
  3. pcwalton commented on Aug 19, 2015

    @pcwalton
    Contributor

    Yeah, this is because we're too layer-happy with our LAYERS_NEEDED_FOR_POSITIONED_DESCENDANTS infrastructure. See #2006

  4. added a commit that references this issue on Aug 19, 2015
    277cbf4
  5. pcwalton commented on Aug 19, 2015

    @pcwalton
    Contributor

    I have a fix for this that I'm testing now.

  6. added a commit that references this issue on Aug 20, 2015
    c328b76
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-layout/blockI-wrong

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions