cedvdb / phone_form_field

Flutter phone number input
https://pub.dev/packages/phone_form_field
MIT License
73 stars 100 forks source link

Unable to delete area code #270

Closed josh-burton closed 6 days ago

josh-burton commented 1 week ago

When an area code is formatted with parentheses, it is unable to be deleted by pressing backspace.

To reproduce:

  1. Enter a mobile number such as +1 416 555 5555
  2. Attempt to delete the number by pressing backspace
  3. Unable to delete the area code, so the text input is stuck at (416).

This is happening because the number is parsed and formatted whenever the text field changes, so the parsing/formatting instantly re-adds back a deleted parentheses.