-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hide search suggestion on clicking outside search field #3758
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doing this on blur wouldn't be sufficient because that would break it for keyboard users. Need to be able to navigate the list with keyboard without having it disappear.
I was naive, overlooking users who navigate using a keyboard. I resolved the issue by addressing two scenarios: Firstly, ensuring the search field remains open when focused elements remain within it. Secondly, closing the search field when focus shifts outside of it, either by clicking elsewhere or navigating away using the keyboard. |
2024-05-01.9.11.46.mov |
Hey @joonmo-you, were you also adding user's search history there. Referencing issue #3859 |
I've just been through the issue you referred to. I am not sure the issue should be discussed here. I think the features related to search history would be better addressed separately. |
Thanks so much @joonmo-you for handling the requested change. It seems to work exactly right. @gaearon you good w/this? |
The current behavior, as @gaearon mentioned here, allows the search suggestion open even when clicking outside the search field. Implementing an event handler for blurring would resolve this issue temporarily. Additionally, I concur with the suggestion to evolve the search suggestion into a popover.