braintree / restricted-input

Restrict <input>s to certain valid characters (e.g. formatting phone or card numbers)
https://braintree.github.io/restricted-input/
MIT License
68 stars 25 forks source link

AndroidChromeStrategy: Always unformat input on keydown #23

Closed intelliot closed 7 years ago

intelliot commented 7 years ago

With third party keyboards on Android, the keypress event never occurs. We still get the keydown event, but currently, we only unformat if the event _isDeletion.

This removes the _isDeletion check and always unformats on keydown.

Keyboards:

Other actions:

crookedneighbor commented 7 years ago

Would like to try this out myself, but I think it looks good.

crookedneighbor commented 7 years ago

Other than my one comment about not overwriting the BaseInput prototype, I think this looks good.

lilaconlee commented 7 years ago

🐈

quinnjn commented 7 years ago

:android: 👍