New issue
Advanced search Search tips

Issue 658593 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Oct 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

ResizeObserver doesn't always fire changes

Reported by christop...@gmx.com, Oct 23 2016

Issue description

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

Steps to reproduce the problem:
1. make a ResizeObserver listen to changes of the body on YouTube:

if (window.ResizeObserver)
{
    let resize_observer = new ResizeObserver(function(){ console.log("resized"); });
    resize_observer.observe(document.body);
}

2. click "Show more" in the comments section of any video

What is the expected behavior?
ResizeObserver firing -> "resized" in console

What went wrong?
nothing happens although body's dimensions obviously changed

Did this work before? No 

Chrome version: 54.0.2840.59  Channel: n/a
OS Version: 10.0
Flash Version: Shockwave Flash 23.0 r0

--enable-blink-features=ResizeObserver flag and Chromium 54 required
 
Actually <body>'s dimensions doesn't change because of:

html, body, #body-container {
  height: 100%;
}


Comment 2 by christop...@gmx.com, Oct 23 2016

Why are Google's pages always using such ugly and tricky special cases...?

Is there any way to get the real size of the document then?


resize_observer.observe(window["body-container"])

Comment 4 by christop...@gmx.com, Oct 24 2016

Sure. I meant a way that works across all pages. This code belongs to an extension that needs to know the page's dimensions. ;)

Comment 5 by atotic@chromium.org, Oct 24 2016

Status: WontFix (was: Unconfirmed)
Thanks l446240525 for helping out.

> Is there any way to get the real size of the document then?

The hard part is defining "real size". What part of the document is the real doc?

Comment 6 by christop...@gmx.com, Oct 24 2016

I get your point. I was excited that ResizeObserver finally seemed to void the need for all those hacks trying to find the scrollable area of a page.
Looks like it just isn't that savior I thought it was after all... :/

Sign in to add a comment