insin / react-maskedinput

Masked <input/> React component
http://insin.github.io/react-maskedinput/
MIT License
730 stars 197 forks source link

add conditional for mask and value changing at same time #66

Closed hunterc closed 8 years ago

hunterc commented 8 years ago

This PR handles the case when both a new mask and a new value at the same time. Before this was handled by two separate if statements but #64 caused an issue where a paste with a different size mask would format wrong.

Also added some more test cases.

thoughts @iamdustan?

iamdustan commented 8 years ago

If I’m following this correctly, we know have tests for

iamdustan commented 8 years ago

cool. This looks stable and hopefully not regression-y. At the very least we have more tests and can start being more defensive on regressions. 😬