Closed puzzledmonkey closed 7 months ago
Yes, this is the expected behavior to solve bug reported in #6276
So now users will need to click twice in order to start typing? That seems like a regression to me, the functionality isn't as smooth as it used to be here.
Is there no other solution?
I would argue the current behavior make SearchInput
behave similar to <select />
, you can toggle options on SearchInput
and <select />
by pressing the spacebar key.
Sorry @crynobone I don't really believe that.
If that's the case, why does the 2nd, 3rd time etc, that you click the dropdown, it focuses as expected with one click.
It's only the first time you open the search input dropdown that it doesn't focus correctly.
It looks like a bug to me..?
Also, line 198 of SearchInput clearly tries to focus the search input field (which works on the 2nd, 3rd, etc. time you open it).
Please can you re-open this issue @crynobone as it's definitely a bug.
@crynobone @davidhemphill i managed to fix this like so - just wrap line 198 in a timeout so the focus trap initiates first, and THEN the search field is focused. this works the first time as well as any subsequent times.
setTimeout(() => {
this.$refs.search.focus()
}, 0)
Description:
When opening a searchable input in an Action modal, the input does not focus correctly.
Detailed steps to reproduce the issue on a fresh Nova installation:
Similar to https://github.com/laravel/nova-issues/issues/6276