autofocus doesn't work for q-input in q-dialog
Software version
Quasar: 0.15.10 OS: Node: NPM: Browsers: iOS: Android: Any other software related to your bug:
JsFiddle (for Quasar v0.15+ only)
https://jsfiddle.net/upap4Lxy/3/
What did you get as the error?
q-input doesn't get focus when opened in q-dialog
What were you expecting?
What steps did you take, to get the error?
Hi,
Yes, it is a limitation. But Quasar still allows you to do that: https://jsfiddle.net/u90e7ryg/1/
ok, thanks!
@rstoenescu Your solution does not work anymore with Quasar v0.17.4 because you are automatically focusing the last button, unless in "prompt" or "options" mode. And because the "show" event is triggered before Quasar force the focus. See https://jsfiddle.net/f5ka4p1u/
It would be nice to have a way to define the focusable element of the dialog.
But as a workaround, you can use $nextTick to set the focus of your custom element.
@show="$nextTick(() => { $refs.input.focus() })"