-
-
Notifications
You must be signed in to change notification settings - Fork 658
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
fix: prevent blur when selecting text #4762
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
@@ -114,7 +114,6 @@ export const Search = ({ | |||
useKeyboardShortcut({ key: 'Escape' }, () => { | |||
if (searchContainerRef.current?.contains(document.activeElement)) { | |||
searchInputRef.current?.blur(); | |||
hideSuggestions(); |
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.
blur effect handler will handle it automatically
setTimeout(() => { | ||
if ( | ||
!mouseDownInside && |
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.
mouse down inside suggestions should not close them
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.
LGTM
About the changes
Selecting text in search suggestions was triggering blur and hiding all the suggestions:
Important files
Discussion points