-
Notifications
You must be signed in to change notification settings - Fork 414
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
Cursor position resetting with a conditional prefix #742
Comments
I think #725 is related |
This is fixed on v5.2.0 |
Hi c0157ea broke cursor position in another case I have phone input. When input is focused and empty - short mask ( when input is not empty - full-format mask ( c0157ea affects copy+paste process Previously, before c0157ea, after applying copy+paste cursor was after last inserted symbol in input prev.movNow (commit c0157ea) after applying copy+paste cursor is stayed on the same place, where is was before pasting now.movIs it possible to fix this issue? |
Sure @akhmadullin, will take a look. Can you create a sandbox with this bug, it will help debugging. |
When using
NumericFormat
with a conditional prefix, the cursor position is reset to the left of the input after the prefix changesIn v4, it maintained the usual behavior, the cursor doesn't move when a prefix is added midway through typing
Code Sandbox: https://codesandbox.io/s/react-number-format-forked-654ycv?file=/src/index.js
To reproduce:
Clear the left input
Type a number
Cursor is reset at the end
Clear the right input
Type a number
Cursor is where it should be
Chrome
Firefox
The text was updated successfully, but these errors were encountered: