Bug 139629 - Unnecessary scroll bars when child is resized manually.
Summary: Unnecessary scroll bars when child is resized manually.
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2014-12-14 15:55 PST by Nit
Modified: 2018-02-12 02:12 PST (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Nit 2014-12-14 15:55:13 PST
Given a parent element <div> with set width, height and overflow: auto, containing a child element <div> with larger set dimensions, when the child element is manually resized (through class addition, Javascript etc.) to be equal the parent's dimensions, the scroll bars are not hidden (as they should be).

Sample on Jsfiddle: http://jsfiddle.net/rktvybb0/
Related discussion on Stack Overflow: http://stackoverflow.com/questions/27474930/avoid-triggering-overflow-auto-after-resizing-a-child-element-to-matching-size/
Comment 1 Nit 2014-12-14 22:41:25 PST
Forcing a redraw with a workaround as seen on the following Stack Overflow thread removes the scrollbars: http://stackoverflow.com/a/3485654/1470607


    this.offsetHeight; //Won't work without this

While this works as a workaround, it would still be nice to see this fixed.
Comment 2 Nit 2014-12-21 14:45:31 PST
The problem only occurs when the new dimensions for the child element are given in pixels, when percentage values are used, the issue isn't present.
Comment 3 Nit 2018-02-12 02:12:35 PST
As of version 63.0.3239.132, this issue is still present.