New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Decimals numbers in styles are formatted incorrectly #8825
Comments
I think I have the same issue with electron 1.4.15 on OSX Sierra 10.12.3 with transition durations, still investigating though: my computed style properties have "," and not "." when decimal values are used, and transitions are not applied then. |
I personally could not reproduce that on macOS 10.12.3 and Czech locale. |
@jiri-prokop @tex0l are either of you able to reproduce this directly in Chrome 56? |
@kevinsawicki No, for me it doesn't happen in Chrome 56.0.2924.87. |
After investigating a bit more on my side:
I have no idea why it doesn't work in my application on my computer, it's not reproductible as hell. FTR, the only differences between my test case and my application are:
|
Ok I investigated a bit more and I have found what makes it reproductible on macOS 10.12.3 and electron 1.6.2: |
I can reproduce the error with Electron 1.6.2 and Mac OS X 10.11.6 German System Electron: window.getComputedStyle(elem).width => "102,70px" I suspect my region setting is producing this issue as i have a German system. And in Germany the decimal sign is a comma. |
Was able to reproduce this in Chrome 58 stable and 60 canary, reported upstream as https://bugs.chromium.org/p/chromium/issues/detail?id=717216 |
Is this issue still occurring on later versions of electron? |
Reproduced on mac 10.13.2, electron 1.8.2, node 9.8.0, russian locale
data attribute has correct value but width style has comma instead dot |
Reproduced on mac 10.13.2, electron 1.8.2, node 9.9.1, russian locale |
Hi. |
Closed as fixed in the |
Expected behavior
Numbers returned by
element.style
orwindow.getComputedStyle
are not formatted according to language preferences. I should always see"7.6px"
.Actual behavior
Numbers returned by
element.style
orwindow.getComputedStyle
are formatted according to language preferences. I see"7,6px"
instead of"7.6px"
.How to reproduce
electron
Alt+Cmd+I
)document.body.style.lineHeight = '7.6px'
document.body.style.lineHeight
"7,6px"
I can't see this behavior in Chrome 56.0.2924.87 on the same machine
The text was updated successfully, but these errors were encountered: