medipass / react-payment-inputs

A React Hook & Container to help with payment card input fields.
https://medipass.github.io/react-payment-inputs
341 stars 62 forks source link

Deleting the card number from middle is deleting in reverse #71

Open Venkat-31 opened 3 years ago

Venkat-31 commented 3 years ago

Enter 4242 4242 4242 4242 on the Card number field Place the cursor after the eighth digit and start deleting the digits

Actual result

When placing the cursor on the middle of the credit card number (after the eighth digit) on the Card number field and starting to delete the number, the first four numbers are deleted, then the cursor stops, and the last digits (from the right of the cursor) begin to be deleted

Expected result

The user should be able to delete all the digits from the left of the cursor when repositioning the cursor to the middle of the number of the credit card (after the eighth digit) and after that, the cursor should stop at the beginning of the field while the remain digits should not be deleted