Open holdenmatt opened 8 years ago
thanks for the report @holdenmatt! i'll take a peek at this, and i'd also welcome a pull request!
or a failing test would be helpful 😁 . my test case didn't catch it: https://github.com/ianmcnally/react-currency-masked-input/blob/master/test/react-currency-masked-input_spec.js#L208-L215
+1 for this.
I'm happy to see support for the bug, but please refrain from +1s. Github's thumbs up reactions will suffice for me.
As to the actual bug, it looks like a hard problem. The browser doesn't pass along the extra period in the value on change, and it allows periods since a number input may have periods.
Your component works great, thanks!
One bug I've seen: entering a period causes weird behavior. E.g.:
I'd expect "." to be a disallowed character like any other non-digit character.