You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This (internal implementation) may be also related to a similar issue of v-autocomplete, where it isn't possible to change value without resetting input to immediately match the new value:
I've been also trying to implement a similar trim feature for a custom textbox component, but for now without successful completion, as there were still edge cases to be considered :(
Just for reference, I was progressing along these lines when brainstorming:
:value="
currentInternalInput ===
(trim ? valueAsText.trim() : valueAsText)
? currentInternalInput
: valueAsText
"
@blur="
// Normalize input on blur to match the bound value
textRef.internalValue = trim ? valueAsText.trim() : valueAsText
"
And the same issue occurs if our use-case is a normalization numbers, e.g. 3.00 to 3.
Environment
Vuetify Version: 2.6.4
Vue Version: 2.6.14
Browsers: Chrome 99.0.4844.84
OS: Mac OS 10.15.7
Steps to reproduce
Fill in text into the textfield, adding a space at the end
Move the cursor to the middle of the text
Delete one character
Expected Behavior
Cursor remains in place
Actual Behavior
Cursor jumps to the end of the text
Reproduction Link
https://codepen.io/yopyaatom/pen/OJzpVXL
The text was updated successfully, but these errors were encountered: