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