Issue metadata
Sign in to add a comment
|
ResizeObserver() returns invalid "width", "height" dimension
Reported by
exodu...@gmail.com,
Jan 13 2018
|
||||||||||||||||||||||
Issue description
UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36
Steps to reproduce the problem:
1. Add new HTML:
<div class="container"></div>
2. Add CSS (make resizable)
.container{
resize: vertical;
max-height 200px:
width: 100px;
height: 100px;
}
3. Add ResizeObserver to <div>
let resizeTimer;
let wrapperResize = new ResizeObserver(entries => {
for (let entry of entries) {
clearTimeout(resizeTimer);
resizeTimer = setTimeout(function() {
console.log('h: ' + entry.target.style.height)
}, 500);
}
});
What is the expected behavior?
The current 'height' is logged to console in a 500ms interval.
The max height is limited to 200px (by CSS). The logged height should NEVER be > 200px
What went wrong?
When a user resizes the height of the <div> very fast, the logged height of the elemnt is > 200px (e.g. 212px, 204px,..)
The browser rendering works as expected. The max height of 200px is respected.
Did this work before? No
Chrome version: 63.0.3239.132 Channel: stable
OS Version: 10.0
Flash Version:
,
Feb 4 2018
,
Feb 10 2018
You are logging "entry.target.style.height", not entry.contentRect.height.
,
Feb 28 2018
The NextAction date has arrived: 2018-02-28 |
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by krajshree@chromium.org
, Jan 15 2018Components: Blink>CSS
Labels: Needs-Feedback Triaged-ET Needs-Triage-M63