QInput autofocus within modals not working
-
The autofocus property for q-input does not seem to work within modals. For eg, if I have a q-input within a modal, once the modal is shown, the autofocus does not trigger.
I also have another modal within a component which requires the same behavior.
Is there any way I can get it to work?I tried the hack from another post:
document.querySelectorAll('input#someid').item(0).focus()
Is there a better way to do this?
-
Did you managed to solved it? @joeyezekiel Iām having the same issue
-
try passing your focus function as parameter on
this.$nextTick([callback])
https://vuejs.org/v2/api/#Vue-nextTick.