-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Caret moved to the end of input after change #63
Comments
Dug the issue a bit. Found suspicious behaviour in
Maybe related to the issue Reposition cursor when pasting full card numbers (#51) |
Thanks for bringing up the issue @agka, the cursor should definitely remain at its position with or without triggering a formatting! |
Hi @ddayguerrero, do you have an idea if and/or when this issue will be fixed? |
@andygi I see that you have a possible PR in the works, I didn't have the chance to look it up myself but perhaps we can go over your solution? |
@ddayguerrero I have worked around the issue and I have fixed for LTR scenario but not for RTL and I don't think it is possible to add some test as well. |
Steps to reproduce
4242 42
)424|2 42
)4
of the example:42|2 42
)Caret is then moved to the end of input (eg.
4224 2|
).(Edit) The same goes when adding a digit in the middle of the current value
4242 42
)424|2 42
)4248|2 42
)Caret is then moved to the end of input (eg.
4248 242|
).Reproduced on https://jondavidjohn.github.io/payform/
This bug occurs as long as there are enough digits to trigger the formatting. If there is fewer chars (id est, only three digits), the caret position is not changed
Expected behavior
Caret position should not change
The text was updated successfully, but these errors were encountered: