New issue
Advanced search Search tips

Issue 818131 link

Starred by 3 users

Issue metadata

Status: Archived
Owner:
Closed: Apr 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

Floating number applies with comma via JavaScript DOM API

Reported by vlad...@gmail.com, Mar 2 2018

Issue description

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

Steps to reproduce the problem:
1. Add any element on page 
2. Do `var div = document.querySelector('div');`
3. Apply any style with floating number, e.g. `div.style.width = "50.5%";`

What is the expected behavior?
Should be `style="width: 50.5%"

What went wrong?
1. Dot transforms into comma and become `style="width: 50,5%"
2. In DevTools I see, that property is wrong, but styles successfully applied
3. After chaging of property (need to keep comma) styles stop working, e.g. change 50,5% to 50,6%

Did this work before? N/A 

Chrome version: 64.0.3282.186  Channel: stable
OS Version: OS X 10.13.3
Flash Version:
 
Снимок экрана 2018-03-02 в 12.59.28.png
67.3 KB View Download

Comment 1 by vlad...@gmail.com, Mar 2 2018

JSFiddle for check: https://jsfiddle.net/4Ly7mo43/5/

Comment 2 by vlad...@gmail.com, Mar 2 2018

I opened Mac System Preferences -> Lang and Region -> Additional -> Delimiter and changed it from comma to dot. Now all works fine, but I am not sure that language preferences should affect JS API.

Comment 3 by woxxom@gmail.com, Mar 2 2018

Sounds like devtools UI is affected by the bug, not JavaScript DOM API.
Components: -Blink Platform>DevTools>UX
Note comment #3. I agree this appears to be DevTools localizing the string and then using that localized version in JS calls.

Comment 5 by alph@chromium.org, Mar 2 2018

Owner: alph@chromium.org
Cannot reproduce it. Please see the screenshot. Where do you observe 10,5% ?

Снимок экрана 2018-03-02 в 11.41.18.png
760 KB View Download

Comment 6 by vlad...@gmail.com, Mar 3 2018

You need to have delimiter to be set "," in MacOS System Preferences. Then restart browser and issue will reproduce.
Снимок экрана 2018-03-03 в 12.14.40.png
315 KB View Download
Labels: Needs-Feedback Triaged-ET
Tested the issue on reported chrome version 64.0.3282.186 using Mac 10.13.3 with steps mentioned below:
1) Launched chrome reported version and opened https://jsfiddle.net/4Ly7mo43/5/(as provided in comment#1)
2) Right click on jsfiddle output and select inspect and observed "width" value
3) Able to see as width: 50.5%;
Observation: Tried checking the issue by changing comma to dot by navigating Mac System Preferences -> Lang and Region -> Additional -> Delimiter, seen the same behaviour.

@Reporter:Please find the attached screen cast for your reference and let us know if we missed anything in reproducing the issue, please provide your feedback on it which helps us in further triaging it.

Thanks!
818131.mp4
4.8 MB View Download
Labels: Needs-Triage-M64
Project Member

Comment 9 by sheriffbot@chromium.org, Apr 6 2018

Status: Archived (was: Unconfirmed)
No feedback was received in the last 30 days from the reporter, so archiving this issue. Please re-open or file a new bug if necessary.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Sign in to add a comment