react-input-enhancements icon indicating copy to clipboard operation
react-input-enhancements copied to clipboard

Mask component has some issues with selection

Open bloodyowl opened this issue 8 years ago • 3 comments

behaviour

  • Type 12
  • Move the caret between 1 and 2
  • Hit Backspace
  • The selection range is [1, 1]

expected

  • The selection range should be [0, 0]

bloodyowl avatar Jun 21 '16 15:06 bloodyowl

Yeah, I'm aware of this - but I haven't found an easy solution. If I remember correctly, my attempts to fix it made the code much more complicated, so I left it as it is for now.

alexkuz avatar Jun 21 '16 16:06 alexkuz

I'll try to make this work and send a PR if you want 🙂 At least supporting this case looks important, notably when you make a typo while writing a credit card number, if the user types without looking at the field, this can be really frustrating.

bloodyowl avatar Jun 21 '16 16:06 bloodyowl

Sure, you're very welcome :) (for the other one as well, same story - I know about it, but I don't see an obvious solution)

alexkuz avatar Jun 21 '16 16:06 alexkuz