Skip to content

Conversation

@metonym
Copy link
Owner

@metonym metonym commented Nov 24, 2025

Fixes #95

This fixes the dropdown not closing when input loses focus via keyboard navigation. This causes overlapping dropdowns and renders the page unusable when showAllResultsOnFocus is enabled.

Changes

  • Change result item selection from click to mousedown with preventDefault() to prevent the input from losing focus when clicking results. This ensures the blur handler only fires for legitimate focus loss (e.g., tab navigation) rather than result selection.

@metonym metonym changed the title fix: close dropdown after blur delay fix: close dropdown for keyboard navigation Nov 24, 2025
@metonym metonym merged commit 4423f0a into master Nov 24, 2025
1 check passed
@metonym metonym deleted the metonym/fix-blur branch November 24, 2025 15:12
@metonym
Copy link
Owner Author

metonym commented Nov 24, 2025

Fixed in v5.0.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

How to close the results when the input loses focus (blur)

2 participants