New issue
Advanced search Search tips

Issue 755509 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

webkit-user-modify: read-write-plaintext-only splits textnode in two on Space input at second line of wrapped text

Reported by d...@moqups.com, Aug 15 2017

Issue description

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

Steps to reproduce the problem:
1. Type into the contenteditable div from the attached test case causing the line of text to wrap to a second line
2. Press the Space key at the beginning of the second line
3. Observe the console output and/or observe the DOM node in Developer tools 

What is the expected behavior?
The TextNode remains intact across two lines.

What went wrong?
The TextNode is split into two adjacent text nodes. Observe that the selection reports anchorNode / anchorOffset relative to the second line of text.

This can cause mismatches between the actual DOM and the internal representation of the DOM in a JavaScript library.

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 60.0.3112.90  Channel: n/a
OS Version: OS X 10.12.6
Flash Version: 

I'm not sure if the behavior is intentional, since I could not find much documentation on "read-write-plaintext-only", but I understand from here: https://www.chromestatus.com/feature/5743696054059008 that it's something inherited from WebKit. 

Safari does not currently exhibit this behavior.
 
jsbin.tuyeticapa.1.html
738 bytes View Download

Comment 1 by yosin@chromium.org, Aug 21 2017

Status: WontFix (was: Unconfirmed)
Mark WontFix, since this is expected behavior. The result is caused by word-wrapping.

-webkit-user-modify is non-standard CSS property, this can not be compatible among
browsers. Please don't use it.

Sign in to add a comment