14
Views
2
Comments
Solved
Firefox and Chrome behavior with input decimal
Question
Application Type
Reactive
Platform Version
11.22.0 (Build 39859)

Hey there,


I was wondering if anyone had gotten this issue. I created an empty reactive module with a screen that as an input that can take a decimal variable and a button. After publishing I noticed different behaviors in Chrome and Firefox.

Chrome: it only allows the use of the dot as decimal separator
Firefox: it allows both dot and comma as the decimal separator

I debuged the app and saw that the variable had the correct value, even if using the comma on firefox.
Why this different behavior?

2024-11-22 09-24-19
Tiago Rebelo
Solution

Chrome follows the HTML5 input specifications seriously. The decimal separator is based on the user’s system’s locale but virtually defaults on a dot (.) for any English oriented locales.

Chrome expects a dot to serve as a separator and commonly does not accept or accepts commas and converts them.

In contrast, Firefox is less strict on number inputs and supports both comma and dot inputs. This is partly due to the internationalization of Firefox, which encourages people to input in their specific locale.


2018-11-09 09-14-06
Gonçalo Almeida

Thanks Tiago.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.