Autofocus input fields with a filled mask to the beginning of the input mask, how?
-
<q-input v-model=“phone” autofocus mask="+7 (###) ###-##-##" fill-mask />
After showing the field, the default input cursor is set at the end of the input mask and goes to the beginning of the input mask at the beginning of entering the value in the fieldHow to make sure that after entering autofocus in the field with the fill-mask, the input cursor is set by default at the beginning of the mask input?
Code SandBox:
https://codesandbox.io/s/q-input-autofocus-mask-filled-77ztl?file=/src/pages/Index.vue -
I’m also facing that issue with the latest version of quasar. Did you found a workaround?
With autofocus set to the input field, the cursor is going at the end of the input. -
Here’s a thread about setting the cursor:
https://stackoverflow.com/questions/48868075/javascript-set-cursor-position-when-changing-the-value-of-input