innerText doesn't follow the spec for out of flow elements. |
|
Issue descriptionChrome Version: 70.0.3538.110 (Developer Build) Fedora Project (64-bit) OS: Linux, though I suspect this is cross-platform. What steps will reproduce the problem? (1) Load the url: data:text/html,Hello <div style="position: absolute">innerText (2) Open the console and execute: document.documentElement.innerText What is the expected result? "Hello innerText" What happens instead? "Hello innerText" https://html.spec.whatwg.org/#the-innertext-idl-attribute says: > If node's used value of 'display' is block-level or 'table-caption', then append 1 (a required line break count) at the beginning and end of items. [CSSDISPLAY] And then explicitly mentions: > Floats and absolutely-positioned elements fall into this category. Gecko gets this right. WebKit is inconsistent even across platforms, see https://bugs.webkit.org/show_bug.cgi?id=192851.
,
Dec 20
Lovely, thank you! |
|
►
Sign in to add a comment |
|
Comment 1 by xiaoche...@chromium.org
, Dec 20Status: Fixed (was: Untriaged)