Fix MaskedInput selection replace with invalid value#5494
Fix MaskedInput selection replace with invalid value#5494JonathanPlasse wants to merge 9 commits intoTextualize:mainfrom JonathanPlasse:fix-masked-input-selection-replace
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. |
|
This is now fixed.
|
|
Hi @JonathanPlasse Thanks for this. Could we please have a test? |
|
I am sorry, I do not have the bandwidth to add tests at the moment. |
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.