New issue
Advanced search Search tips

Issue 854177 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 573309
Owner: ----
Closed: Jun 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

Element.innerText does not properly handle floats and absolutely-positioned elements

Reported by innovati...@gmail.com, Jun 19 2018

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/66.0.3359.181 Chrome/66.0.3359.181 Safari/537.36

Steps to reproduce the problem:
1. visit test page (see attached html)
2. call document.documentElement.innerText

What is the expected behavior?
According the specs:

https://html.spec.whatwg.org/multipage/dom.html#the-innertext-idl-attribute

"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]

Floats and absolutely-positioned elements fall into this category."

I expect to get:

"foo
bar"

What went wrong?
"foobar"

Did this work before? N/A 

Chrome version: 66.0.3359.181  Channel: stable
OS Version: Ubuntu 16.04
Flash Version: 

Firefox, Edge and IE handle this correctly.
 
test.html
80 bytes View Download

Comment 1 by bokan@chromium.org, Jun 19 2018

Components: -Blink Blink>HTML
Status: Untriaged (was: Unconfirmed)

Comment 2 by tkent@chromium.org, Jun 20 2018

Mergedinto: 573309
Status: Duplicate (was: Untriaged)

Sign in to add a comment