New issue
Advanced search Search tips

Issue 916540 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner: ----
Closed: Dec 20
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

innerText doesn't follow the spec for out of flow elements.

Project Member Reported by emilio@chromium.org, Dec 19

Issue description

Chrome 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.
 
Labels: M-72
Status: Fixed (was: Untriaged)
This is already fixed in M72.
Lovely, thank you!

Sign in to add a comment