-
Notifications
You must be signed in to change notification settings - Fork 844
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
Fix MaskedInput selection replace with invalid value #5494
base: main
Are you sure you want to change the base?
Fix MaskedInput selection replace with invalid value #5494
Conversation
The Wouldn't this PR only replace a single character, rather than the whole selection as you would expect? |
You are right |
Fixed |
Unfortunately, I think fixing the For example, try running the credit card example in the docs with the changes in this PR. After entering some numbers to complete the input, try selecting some text using the mouse (it might help adding the highlighting) then enter a number. This will crash if the selection included a separator as the value does not match the template. |
9f89228
to
d65641f
Compare
This is now fixed.
|
d65641f
to
a40592c
Compare
Please review the following checklist.
This PR implements the
MaskedInput.replace()
method by using the already existingMaskedInput.insert_text_at_cursor()
which replace the characters following the cursor position.