flutter_pattern_formatter icon indicating copy to clipboard operation
flutter_pattern_formatter copied to clipboard

Users lose their input if they try to type a second decimal separator

Open andreidiaconu opened this issue 3 years ago • 2 comments

Not sure if relevant but I'm using a Locale where decimal separators are , eg: 12.345,67

Steps to reproduce:

  1. Simple Text field with a ThousandsFormatter(allowFraction: true) input formatter.
  2. Type 12345,67 which renders as 12.345,67
  3. Continue by typing ,

Expected:

  1. You see 12345,67

Actual:

  1. You see 0,

As it happens, I needed to do some other formatting and I fixed this by adding a formatter before ThousandsFormatter, which makes sure that a second , is not possible to type.

andreidiaconu avatar Sep 07 '20 10:09 andreidiaconu

I also can duplicate this same issue as @andreidiaconu but in my case, I use the period . to separate decimals.

Sun3 avatar Sep 15 '20 22:09 Sun3

I'm still having this issue as well.

minhdanh avatar Jul 19 '21 06:07 minhdanh