New issue
Advanced search Search tips

Issue 660619 link

Starred by 2 users

Issue metadata

Status: Duplicate
Merged: issue 660609
Owner: ----
Closed: Oct 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

contentEditable <div> doesn't support 'auto' direction per line.

Project Member Reported by samsmlee@google.com, Oct 29 2016

Issue description

What steps will reproduce the problem?
(1) Go to https://jsfiddle.net/4xv0bztL/
(2) In the output page, click on the contentEditable element.
(3) Press End, Press Enter, and type in English (LTR lanaguge)

What is the expected output?
The English should be LTR

What do you see instead?
The English is still RTL

The reason why the second line is still RTL is that the Enter creates <div><br></div>, its dir attribute is empty, and it inherits the computed value of the parent.

Different apps that use contentEditable as an editor would have to handle this case on their own. It'd be great for Blink to just implement this logic for all app developers. :)

EditText handles this on its own.

Perhaps via an API in WebView?
Perhaps a javascript API? Attribute of a contentEditable element?
 

Comment 1 by samsmlee@google.com, Oct 29 2016

Components: Blink>Editing

Comment 2 by yosin@chromium.org, Oct 31 2016

Components: -Blink>Editing Blink>Layout
Mergedinto: 660609
Status: Duplicate (was: Untriaged)
This is happend on uneditable DIV. It seems "dir" is determined by first line.
https://jsfiddle.net/4xv0bztL/1/

Sign in to add a comment