New issue
Advanced search Search tips

Issue 703853 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

Position:sticky top/bottom do not work together

Project Member Reported by dvoytenko@google.com, Mar 21 2017

Issue description

Chrome Version: (copy from chrome://version)
OS: (e.g. Win7, OSX 10.9.5, etc...)

Mac OSX 10.12.2
Chrome: 56.0.2924.87 (64-bit)

What steps will reproduce the problem?
(1) Open http://output.jsbin.com/hosusu/quiet
(2) Scroll up and down
(3) Observe which elements stick and which do not.

In particular:
a. "Sticky, with top" (`top: 0`) and "Sticky, with bottom" (`bottom: 0`) stick to top and bottom correspondingly. Correct behavior.
b. "Sticky, with top and bottom" (`top: 0; bottom: 0;`) sticks correctly to the top. But, does NOT stick to the bottom, which is incorrect.

Thus, it appears that `top: 0` somehow cancels `bottom: 0`.

Safari and Firefox behave correctly.
 

Comment 1 by shend@chromium.org, Mar 21 2017

Components: -Blink>CSS Blink>Layout
Labels: OS-All
Status: Available (was: Untriaged)
Confirmed on Google Chrome 59.0.3043.0 dev (Linux).

Comment 2 by smcgruer@google.com, Mar 24 2017

Owner: yigu@chromium.org
Cc: flackr@chromium.org smcgruer@chromium.org
Labels: Hotlist-ThreadedRendering

Comment 4 by wanchang...@lge.com, Mar 31 2017

I uploaded a patch for this and waiting review.
https://codereview.chromium.org/2788053002/
Project Member

Comment 5 by bugdroid1@chromium.org, Apr 5 2017

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

commit b23829632c36f42e8cbcf6a3adf8fc11aaa4b337
Author: wanchang.ryu <wanchang.ryu@lge.com>
Date: Wed Apr 05 21:31:41 2017

Fix sticky bottom is not applied with both sticky

The box which has a sticky position should be used instead of
scroll container block to check whether the box can be
positioned in constraningsize with sticky both sides offset.

BUG= 703853 
TEST=fast/css/sticky/sticky-both-sides*

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

[modify] https://crrev.com/b23829632c36f42e8cbcf6a3adf8fc11aaa4b337/third_party/WebKit/LayoutTests/FlagExpectations/root-layer-scrolls
[add] https://crrev.com/b23829632c36f42e8cbcf6a3adf8fc11aaa4b337/third_party/WebKit/LayoutTests/fast/css/sticky/sticky-both-sides-bottom-right-constrained-expected.html
[add] https://crrev.com/b23829632c36f42e8cbcf6a3adf8fc11aaa4b337/third_party/WebKit/LayoutTests/fast/css/sticky/sticky-both-sides-bottom-right-constrained.html
[rename] https://crrev.com/b23829632c36f42e8cbcf6a3adf8fc11aaa4b337/third_party/WebKit/LayoutTests/fast/css/sticky/sticky-both-sides-top-left-constrained-expected.html
[rename] https://crrev.com/b23829632c36f42e8cbcf6a3adf8fc11aaa4b337/third_party/WebKit/LayoutTests/fast/css/sticky/sticky-both-sides-top-left-constrained.html
[modify] https://crrev.com/b23829632c36f42e8cbcf6a3adf8fc11aaa4b337/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp

Owner: flackr@chromium.org
Status: Fixed (was: Available)
Thanks for the fix!
Awesome! Thanks!

Sign in to add a comment