autoNumeric: Input is duplicated and reversed on devices with Android < 7.0

Expected behavior

Entering 123 should format the input to 123 €

Actual behavior

Entering 123 resulted in 123.321 € on SAMSUNG GALAXY S5 (Android 6.0.1, Chrome v61) Entering 123 resulted in 12.321 € on HTC ONE (Android 5.0.2, Chrome v61)

Steps to reproduce the problem

  1. I tested this using autoNumeric v4.1.0and the browser Chrome version 61 on Android 6.0.1 and Android 5.0.2,
  2. I used the example from http://autonumeric.org

I’ve had no problems with autoNumeric on devices using Android > v7.0.

Best regards, J.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 38 (21 by maintainers)

Commits related to this issue

Most upvoted comments

Hi @danielmuehlbacher We currently faced the same issue but were finally able to pinpoint the source of it and why it only happens with Samsung Devices.

The issue is caused by the Samsung Keyboard Autocorrect Feature (“Text suggestions”). Credits to this finding goes to the Angular Community: https://github.com/assisrafael/angular-input-masks/issues/104

If you disable this Samsung Feature, the autoNumeric works as expected. As a more clean workaround (which does not require user interaction to globally disable the feature) it works, if you add this to the field which uses autoNumeric:

autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"

This disables the Samsung autocomplete feature.

No chance for a beauty award, but a reliable solution…

Best Regards,

Jan

Magic! :godmode:

:trollface:

Ok so I fixed that issue and the bug where on Android Chrome blurring the input would clear the value.

It’s now live in v4.1.0-beta.26! (you can check the latest codepen too see it in action)

Please test on you end and report any problem you find, thanks!

Note: There is still one known issue (that needs be created by the way 😉) on Android Chrome; if you cut a part of the number, then an input event is sent with an inputType deletedByCut, and since it was not cut with ctrl+x, AutoNumeric does not see that correctly and does not update the rawValue.

@AlexandreBonneau This should be possible (https://developers.google.com/web/tools/chrome-devtools/remote-debugging/), but I won’t be able to try this until tomorrow or friday.

I have a Samsung Galaxy Tab A 10.1 tablet which has the same problem, but autocomplete is not turned off by using the properties Jan Thiel suggested. If you need me to test something please let me know.