RedMadRobot / input-mask-android

User input masking library repo.
MIT License
1.21k stars 114 forks source link

Backspace button on number keyboard does not erase spaces and dashes correctly #60

Closed madlabman closed 6 years ago

madlabman commented 6 years ago

I use that as part of react-native-text-input-mask library replacing implemented 2.3.0 version from VCS to your latest release (3.4.4). But both versions give me the same result. On iOS same code works fine.

Any idea?

backspace-input-mask

taflanidi commented 6 years ago

Hi @madlabman! Thanks for your question.

I ain't got no idea what actually happens under the hood of the React Native app shown on your GIF, I can only make a few guesses.

First of all, it clearly has something to do with autocompletion. So you may consider disabling it as an option. Second, it feels like there are two listeners conflicting with each other. This might have happened due to React Native implicitly adding middleware TextWatchers, but that's unlikely. Third, something is trying to modify the text through the text field's setText(...) instead of the Editable variable passed into the TextWatcher's interface method.

FYI, I'm actually working on the «official» React Native port of our InputMask library. I just need to figure out some of the basics in order to get started, and then you may expect our support on the cross-platform basis.

madlabman commented 6 years ago

Thanks for your reply @taflanidi!

I set autocompletion option to false and fix my issue.