New issue
Advanced search Search tips

Issue 860529 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

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:
 
Cc: vamshi.kommuri@chromium.org
Labels: Triaged-ET Needs-Triagep-M67 Needs-Feedback
Thanks for filing the issue!

Tried checking the issue on reported chrome version 67.0.3396.99 using Mac 10.13.1 with the below mentioned steps.
1. Launched Chrome
2. Navigated to https://jsbin.com/cexomotulu/edit?html,console,output
3. Entered "test سيبسيبسي" got console output as "سيبسيبسي test" 
   Entered "سيبسيبسي  123" got console output as "سيبسيبسي  123"
Attaching the screen shot of the same. 
Note: We observed similar behaviour in other browsers too.

@Reporter: As we are not very sure about the issue, Could you please have a look at the screenshot and provide any additional inputs which helps us to triage this further in a better way.
860529.png
316 KB View Download
Labels: -Needs-Triagep-M67 Needs-Triage-M67
Cc: tkent@chromium.org
Components: -Blink>HTML Platform>DevTools
NextAction: 2018-07-31
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.

After entering the value, if you read it using JS and display in HTML, it comes out wrong.
Project Member

Comment 5 by sheriffbot@chromium.org, Jul 17

Labels: -Needs-Feedback
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
Labels: Needs-Feedback
> 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)") ?

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 :)
Project Member

Comment 8 by sheriffbot@chromium.org, Jul 17

Labels: -Needs-Feedback
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
Cc: -tkent@chromium.org
Components: -Platform>DevTools Blink>Layout
Status: Untriaged (was: Unconfirmed)
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.

NextAction: ----
Owner: kojii@chromium.org
Status: Assigned (was: Untriaged)
Let's make sure we fix this properly in NG.
rtl.html
269 bytes View Download
Cc: kojii@chromium.org
Labels: Fixed-In-LayoutNG
Owner: ----
Status: Available (was: Assigned)

Sign in to add a comment