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

Add hook for paste events #66

Closed crookedneighbor closed 5 years ago

crookedneighbor commented 5 years ago

Turns out, testing the paste behavior was pretty tricky, both at a unit level (since you can't simulate paste events in the browser) and on an integration level (since the drivers give limited access to the keyboard) :(

Since the change was pretty small, and didn't change behavior for other pieces of the lib, we were okay with leaving it untested. (same state the normal paste behavior is)