RTL input incorrectly breaking braces with numbers, works for alpha characters
Reported by
abhinayr...@gmail.com,
Jul 5
|
||||||||||
Issue description
UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:61.0) Gecko/20100101 Firefox/61.0
Steps to reproduce the problem:
1. Create an input/textarea field with `dir="rtl"` attribute.
2. Enter some RTL text (like Arabic) and add `{1}` or `(1)` in the end. Exmaple: "سيبسيبسي (1)"
3. When you read the value from the input field using JS, it's broken incorrectly.
JSBin: https://jsbin.com/cexomotulu/edit?html,console,output
What is the expected behavior?
Try this if Firefox, it works as desired: https://jsbin.com/cexomotulu/edit?html,console,output
What went wrong?
It works fine if you put something like `(test)` in the end of an RTL string but breaks if you add `(123)` to the end.
Did this work before? N/A
Does this work in other browsers? Yes
Chrome version: Version 67.0.3396.99 (Official Build) (64-bit) Channel: stable
OS Version: OS X 10.13
Flash Version:
,
Jul 9
,
Jul 17
The reporter, how did you confirm the value was broken? DevTools console is LTR. So the display value of RTL <input> and the console log are expected to be different.
,
Jul 17
After entering the value, if you read it using JS and display in HTML, it comes out wrong.
,
Jul 17
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jul 17
> After entering the value, if you read it using JS and display in HTML, it comes out wrong.
Did you show the value in an RTL element? Did you check the value with JavaScript code like input.value.endsWith("(1)") ?
,
Jul 17
So yes it works fine if I add `dir="rtl"` but still the behavior was inconsistent with Firefox so if you feel it's not a big deal or Chrome is handling it right, we can close this issue :)
,
Jul 17
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jul 18
It seems this issue is fixed partially by LayoutNG. <!DOCTYPE html> <meta charset="utf-8"> <body> <div style="width:240px;"> <div>RTL: <input dir=rtl value="سيبسيبسي(1)"> <div dir=rtl>سيبسيبسي(2)</div></div> <div>LTR: <input value="سيبسيبسي(3)"> <div>سيبسيبسي(4)</div></div> </div> </body> With Firefox, all of (1) to (4) are placed at left side. Without LayoutNG, (3) and (4) look broken. With LayoutNG, only (3) looks broken because LayoutNG doesn't support form controls.
,
Jul 18
,
Jul 18
Let's make sure we fix this properly in NG.
,
Jul 18
|
||||||||||
►
Sign in to add a comment |
||||||||||
Comment 1 by vamshi.kommuri@chromium.org
, Jul 6Labels: Triaged-ET Needs-Triagep-M67 Needs-Feedback
316 KB
316 KB View Download