New issue
Advanced search Search tips

Issue 674867 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 2
Type: Compat



Sign in to add a comment

position:fixed element within position:absolute within position:relative is not re-positioned correctly

Project Member Reported by stapelberg@google.com, Dec 16 2016

Issue description

Chrome Version: 56.0.2924.21 (Official Build) beta (64-bit)
OS: Goobuntu

What steps will reproduce the problem?
(1) Open https://jsfiddle.net/r395xsyq/4/
(2) Depending on your display: scroll so that the HTML output requires scrolling. (in the device toolbar, behavior is different between “Laptop with HiDPI screen” and “Laptop with MDPI screen”)
(3) Click the “re-position” link.

What is the expected result?
The “fixed header” div should be positioned at the top of the page.

What happens instead?
The “fixed header” div continues to be positioned at its old position. Once you change the size of the browser window, the div will be located at the correct position.

I uploaded a video of what I see at https://youtu.be/bei6RJSdIGE

I also tested this fiddle in Firefox 50.1.0, and the behavior differs from Chrome. Firefox’s behavior is not correct in all cases either, but the two browsers behaving differently makes me think this is a browser bug.
 

Comment 1 by tkent@chromium.org, Dec 19 2016

Components: Blink>Layout

Comment 2 by e...@chromium.org, Jan 2 2017

Cc: skobes@chromium.org szager@chromium.org
Labels: OS-Android OS-Chrome OS-Mac OS-Windows
Status: Available (was: Untriaged)
Any update on this issue?
Cc: -skobes@chromium.org
Owner: skobes@chromium.org
Status: Started (was: Available)
Looking into this.
Patch up: http://crrev.com/2683773004
Project Member

Comment 6 by bugdroid1@chromium.org, Feb 8 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ccf2862c092b2339e42d7131d219b18060a773a7

commit ccf2862c092b2339e42d7131d219b18060a773a7
Author: skobes <skobes@chromium.org>
Date: Wed Feb 08 03:17:45 2017

Fix missed invalidation in markFixedPositionObjectForLayoutIfNeeded.

If a fixed-position element had "auto" offsets in both block and inline flow
directions, the LayoutOnlyFixedPositionedObjects codepath failed to mark it for
layout when its computed logical top changed.

BUG= 674867 

Review-Url: https://codereview.chromium.org/2683773004
Cr-Commit-Position: refs/heads/master@{#448889}

[add] https://crrev.com/ccf2862c092b2339e42d7131d219b18060a773a7/third_party/WebKit/LayoutTests/fast/block/positioning/fixed-in-abs-in-rel-top-change.html
[modify] https://crrev.com/ccf2862c092b2339e42d7131d219b18060a773a7/third_party/WebKit/Source/core/layout/LayoutBlock.cpp

Comment 7 by skobes@chromium.org, Feb 13 2017

Status: Fixed (was: Started)
Verified in canary (58.0.3011.0).
I can confirm this issue is fixed in Chrome 58.0.3013.3. Thanks!

Sign in to add a comment