omarshammas / jquery.formance

A jQuery library for formatting and validating form fields, based on Stripe's jQuery.payment library.
omarshammas.github.io/formancejs
Other
632 stars 105 forks source link

Phone number field acts weird when moving with arrow keys then making changes #6

Open omarshammas opened 11 years ago

omarshammas commented 11 years ago

If I fill out the phone number all the way, then go back with the arrow keys and try to delete/change numbers, I get weird behavior

ts commented 10 years ago

:+1:

And to clarify, the behavior is predictable. When removing a character (via delete or backspace) the cursor stays between the remaining characters, but moves to the end of the input field as another is typed, placing the new character at the end of the input.

To make things more fun, when pasting a character into the position where one was removed (or in place of a currently selected char), Formance behaves as expected.

In all cases the cursor is placed at the end of the input.

(Safari 7, Chrome 30.0.1599.101 on OS X 10.9)

omarshammas commented 10 years ago

Thanks for the feedback @ts

A fix has been included in the revamp branch, which will hopefully be released soon.

It is isn't perfect, there are still other smaller issues when modifying text in the middle, but it is considerably better.