wire-elements / spotlight

Livewire component that brings Spotlight/Alfred-like functionality to your Laravel application.
MIT License
912 stars 71 forks source link

Focus when using token scope and deleting the scope in the UI #117

Closed nick-wilkins closed 1 year ago

nick-wilkins commented 1 year ago

When I'm using the token / scope ability, and am on a particular page that uses that scope, when I hit the backspace key / delete the scope in the UI, the input loses focus and the user can't start typing without using the mouse to re-focus the search box (or close and open it again)

PhiloNL commented 1 year ago

Hey @nick-wilkins, Could you share some more details, like which browser you are using, and maybe record a screencast?

For example, when I visit the following page https://wire-elements.dev/docs/getting-started/spotlight-component and hit CMD+K, and use backspace to remove the active scope, the focus remains—tested on Chrome and Safari.

Thanks!

nick-wilkins commented 1 year ago

Hi @PhiloNL - ahh yes I see. This must be an implementation bug somewhere along the line with what I'm doing (the link you provided works fine, same browser etc), or from a certain setup of token / scope combinations. I'll investigate and let you know if I get more info on this. Thanks