New issue
Advanced search Search tips

Issue 749816 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 3
Type: Bug



Sign in to add a comment

Setting Text.nodeValue - carriage return renders as whitespace in a block

Reported by scottdav...@gmail.com, Jul 27 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36

Steps to reproduce the problem:
1. Create a block element, with a text node inside it
2. Set the text node's nodeValue to start with a carriage return character (\r), charCode 13.
   ie: textNode.nodeValue = "\r\nText";
3. The \r does not collapse in the block and renders as a space character.

Here is a codepen example:
https://codepen.io/anon/pen/wqKWeb

What is the expected behavior?
The \r should not render.

What went wrong?
The \r renders as a space.

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 59.0.3071.115  Channel: n/a
OS Version: 10.0
Flash Version:
 
Labels: Needs-Milestone

Comment 2 by ajha@chromium.org, Jul 31 2017

Cc: ajha@chromium.org
Components: -Blink>Internals Blink>DOM
Labels: -Needs-Milestone M-62 OS-Linux OS-Mac
Status: Untriaged (was: Unconfirmed)
Able to reproduce the issue on the latest canary(62.0.3172.0) and the latest stable(59.0.3071.115) of Windows-10, Mac OS 10.12.5 and Linux Ubuntu 14.04. This is non-regression issue as similar behavior is seen on older chrome version: 50.0.2646.0.

Chrome versions prior to that(48.0.2527.0 & 45.0.2454.101) doesn't show toggle behavior with the codepen example.
Components: -Blink>DOM Blink>Layout

Comment 4 by e...@chromium.org, Aug 1 2017

Cc: kojii@chromium.org xiaoche...@chromium.org
Owner: xiaoche...@chromium.org
Status: Assigned (was: Untriaged)
xiaochengh: Would you mind taking a look at this? I know you've spend some time in the relevant code lately.
Labels: -Pri-2 Pri-3
Owner: ----
Status: Available (was: Assigned)
Not going to fix it soon...

Sign in to add a comment