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:

    Is there a better way to do this?