scrollHeight behaves erratically on iframe with absolute main div and doctype
Reported by
michael....@gmail.com,
Oct 1
|
||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36 Steps to reproduce the problem: Consider the two attached files and load minimal.html 1. As is, the iframe's scrollHeight after load() is reported in the console as 0 2. Remove "<!DOCTYPE html>" from minimal-frame.html; the value reported is now 150 when loading minimal.html 3. Remove "position: absolute" from minimal-frame.html, keeping the doctype; the value reported is now 180 4. Remove both the style and the doctype; the value reported is 196 What is the expected behavior? That the value be consistent. What went wrong? The values reported look erratic. Did this work before? N/A Chrome version: 69.0.3497.100 Channel: stable OS Version: Arch Linux Flash Version:
,
Oct 1
This is working as intended. The doctype changes the rendering mode (standards vs quirks) which affects the reported height. Similarly position absolute changes the rendering mode for the subtree affecting the height.
,
Oct 3
Thanks very much for the swift reply. If I may insist a bit ("case" refers to the list of top post):
About case 1: Why is the reported height 0, then? Took me hours to track that down.
About case 2: Add plenty more <br/>, the reported height is still 150; if "position: absolute" is removed (case 3 or 4), the height grows; is this really expected?
|
||
►
Sign in to add a comment |
||
Comment 1 by phanindra.mandapaka@chromium.org
, Oct 1