New issue
Advanced search Search tips

Issue 899588 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Oct 30
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 1
Type: Bug-Regression



Sign in to add a comment

Chrome 70: Element.innerText returns two line breaks for one empty line entered in rich text editor

Reported by conju...@gmail.com, Oct 29

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36

Steps to reproduce the problem:
1. Open the attached test file or http://jsfiddle.net/1brnpL92/
2. In the editor at the top of the page, enter "a", hit the return key two times then enter "b". This will result in 3 lines in the editor: "a", one blank line and "b".

What is the expected behavior?

What went wrong?
The blank line is made with <div><br></div>. This is expected as in older Chrome versions.
However, innerText returns two line breaks for the empty line so it looks as there are two blank lines.

Did this work before? Yes Chrome 69.x

Does this work in other browsers? No
 Chrome up to 69 and Edge does not have the issue, return one line break for empty row expectedly.
Firefox 60+ behaves the same as Chrome 70.

Chrome version: 70.0.3538.77  Channel: stable
OS Version: OS X 10.13.6
Flash Version:
 
Chrome70_innerText.html
1.1 KB View Download
Bisected to r585756 "Implement Element#innerText to conform the spec"
Landed in 70.0.3533.0
Cc: yosin@chromium.org
Components: Blink>Editing>Selection
Labels: Needs-Bisect Needs-Triage-M70
Cc: susan.boorgula@chromium.org
Labels: -Pri-2 -Needs-Bisect ReleaseBlock-Stable Triaged-ET RegressedIn-70 Target-70 Target-71 Target-72 M-70 FoundIn-71 FoundIn-70 FoundIn-72 OS-Linux OS-Windows Pri-1
Owner: yosin@chromium.org
Status: Assigned (was: Unconfirmed)
conjunt9@ Thanks for the issue.

Able to reproduce this issue on Windows 10, Mac OS 10.13.6 and Ubuntu 17.10 on the reported version 70.0.3538.77 and latest Canary 72.0.3595.2.

Bisect Information:
===================
Good Build: 70.0.3532.0
Bad Build : 70.0.3533.0

As per comment #1, suspecting the below change:
Reviewed-on: https://chromium-review.googlesource.com/1114673

yosin@ Please check and confirm if this issue is related to your change, else help us in assigning to the right owner.

Adding 'ReleaseBlock-Stable' for M-70 as this is a recent regression. Please feel free to remove if it is not applicable.

Thanks..
Cc: -yosin@chromium.org
Components: -Blink>Editing>Selection Blink>Editing>Serialization
Owner: ----
Status: WontFix (was: Assigned)
Mark WontFix since this is as expected.
Since M70, Element#innerText follows the spec[1].

Note: Due by the spec bug, we'll revert M70 and M71 to M69 behavior.
And M72 will follow the fixed spec[2].


[1] https://html.spec.whatwg.org/multipage/dom.html#the-innertext-idl-attribute
[2] https://github.com/whatwg/html/pull/4132

Sign in to add a comment