Serheo / PhoneNumberFormatter

UITextField subclass for formatting phone numbers. Allow different formats for different countries(patterns).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug: Can't delete number when cursor placed after separator character

getaaron opened this issue · comments

Reproduction steps

  1. Create a PhoneFormattedTextField
  2. Set config.defaultConfiguration = PhoneFormat(defaultPhoneFormat: "(###) ###-####")
  3. Run the app
  4. Type (212) 345-6789
  5. Place the cursor between - and 6
  6. Press backspace ⌫

Expected Behavior

I expected

  • the 5 to be deleted
  • the remaining text to be formatted as (212) 346-789
  • the cursor to remain between 4 and 6

Actual behavior

Nothing changed.

Screenshot

image

Thanks for the report. try version 1.5