autoNumeric icon indicating copy to clipboard operation
autoNumeric copied to clipboard

Android allows dot `.` after value with `decimalPlaces: 0` set

Open cooksworld opened this issue 6 years ago • 2 comments

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

  1. Use autoNumeric version >4.5.9
  2. In the browser <Chrome/Android> version 78.0.3904.108.
  3. On the Android version 10 operating system
  4. 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

cooksworld avatar Nov 27 '19 23:11 cooksworld

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.

AlexandreBonneau avatar Jan 16 '20 19:01 AlexandreBonneau

Experiencing this too :(

agwidarsito avatar Jul 15 '20 06:07 agwidarsito