Possible variation of .trim

I find I’m regularly doing things like this (in Quasar):

<q-input
  v-model="v"
  @blur="v = v.trim()"
/>

because if I use v-mode.trim="v", editing the text is quite awkward. For example, if you type “The w” and then delete the ‘w’, most people would expect there to still be a space after “The” and start typing the correct letter, ending up with “Theq” instead of “The q”.

I’ve tried v-model.lazy.trim, but that’s no different. Is there scope for a change or alternative directive like v-model.lazytrim, which would only be trimmed on blur?.

the trim modifier is smart enough to handle this. it should keep that space in the actual input field:

Ah. In that case, it’s a quasar thing. I will dig into the q-input component. Tx

I’m on Vue 3 and this is an issue for me. It won’t allow spaces in the input if there’s a @input event handler. How can I solve this?

Here’s the behavior. First input has an input hander and other one doesn’t.

UPDATE: Found out that it happens if you update any props inside the input handle. Basically the component can’t be re-rendered if you’re using .trim.