Why the autofocus doesnt work on modals?
Why the autofocus doesnt work on modals?
I open up the modal, but the text input is not focused, should be focused automatically, or i am wrong?
if im wrong, how would be the workaround to achieve to be focused when the modal opens up?
2 Replies
What other inputs are in the form? Modals by default use alpines trap focus so the first field should be auto focused by default, but I’ve noticed that other js based fields can break that functionality because they emit livewire requests which would cause inputs to loose focus.
ohhh i found it out
i have a select (
Forms\Components\Select
)
which has:
->native(false)
i removed the line ->native(false)
and now autofocuses properly
but
idk which one i prefer
i think i prefer the not native select component over the autofocus feature
so im keeping it as i had it
is this bug already reported?