New issue
Advanced search Search tips

Issue 672453 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

Browser scroll not applying after resize to div (inline-block parent, position relative-absolute combo)

Reported by sean.ada...@gmail.com, Dec 8 2016

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.75 Safari/537.36

Steps to reproduce the problem:
1. Load up the attached test file
2. Note that on load there is vertical scroll on the browser
3. Click anywhere in the document to toggle the height of the green div to small
4. Click anywhere in the document again to toggle the height of the green div to tall (10000px, enough to require scroll)

What is the expected behavior?
You'd expect when the green div is small there is no browser scroll, and when tall there is browser scroll.

What went wrong?
You can see that the scroll bar does not appear when the green div grows.

Did this work before? N/A 

Chrome version: 55.0.2883.75  Channel: stable
OS Version: 10.0
Flash Version: Shockwave Flash 23.0 r0

The attached test file has been tested in FireFox, IE 10/11, and Edge.  In those other browsers the scroll bar correctly reapplies when the JS makes the green div grow.

This is a pretty specific combination of CSS that causes the problem.
- outer div must have display:inline
- outer div must have both width and height at 100%
- the growing div must be part of a position absolute-relative combo

It may seem like an edge case, but any kind of expanding UI element (date/colour picker) could require the position absolute-relative combo for it's alignment; to then have a div further up the DOM with inline-block and width/height at 100% can easily happen.

Additionally, it is worth noting that on initial load the browser renders fine and calculates the requirement for the scrollbar.  The issue only presents itself after a re-render instigated by a JS driven change.
 
scroll-bug.html
616 bytes View Download
Components: -Blink Blink>Scroll

Comment 2 by bokan@chromium.org, Dec 8 2016

Cc: bokan@chromium.org
Labels: Hotlist-Input-Dev
Owner: chaopeng@chromium.org
Status: Assigned (was: Unconfirmed)
Confirmed, in 55.0.2883.75 on Linux. Chao, take a look when you have a chance.
Status: Started (was: Assigned)
Cc: chaopeng@chromium.org
Components: -Blink>Scroll Blink>Layout
Labels: OS-Linux OS-Mac
Owner: ----
Status: Untriaged (was: Started)
For my investigation, this issue is cause by the documentRect incorrectly in |FrameView::adjustViewSize|.

Something maybe useful, |InlineFlowBox::m_overflow| got set in |InlineFlowBox::setOverflowFromLogicalRects - setLayoutOverflow| in first load but didn't when JS expand the element.

Comment 5 by e...@chromium.org, Jan 26 2017

Owner: szager@chromium.org
Status: Assigned (was: Untriaged)

Sign in to add a comment