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 descriptionUserAgent: 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:
,
Oct 29
,
Oct 29
,
Oct 30
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..
,
Oct 30
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 |
|||||
Comment 1 by woxxom@gmail.com
, Oct 29