Android allows dot `.` after value with `decimalPlaces: 0` set
Current behavior
On Android the user can enter a dot . after value with decimalPlaces: 0 set. Testing in Chrome on iOS, OSX, and Windows 10 does not allow a dot . to be entered. On blur the decimal place . is removed.
Expected behavior
With decimalPlaces: 0 set a user should not be able to enter a decimal place dot ..
Steps to reproduce the problem
- Use autoNumeric version >
4.5.9 - In the browser
<Chrome/Android>version78.0.3904.108. - On the
Android version 10operating system - Then instantiate the autoNumeric object with the following options:
new AutoNumeric('input', 42, {decimalPlaces: 0});
Link to live example (ie. Codepen)
https://codepen.io/cooksworld/pen/LYYwxbM?editors=1010
Using Android 9 with Firefox mobile, I get another weird behavior ;
When putting the caret after 42|, then typing once ., nothing happens which is normal.
But if you enter . again, then the 2 is dropped and you get 4|.
Again, if you type . once more, nothing happens, but typing . a fourth time removes the 4 as well.
Experiencing this too :(