Skip to content
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 issues showing autocomplete results in Firefox #116

Merged
merged 1 commit into from
Feb 22, 2024
Merged

Conversation

camertron
Copy link
Contributor

@camertron camertron commented Feb 20, 2024

I ran into an interesting issue last week that was causing weirdness showing autocomplete results that use the popover API:

Before:

before.mov

After:

after.mov

The issue seemed to be that, when a list item was clicked, focus would return to the text input. Focusing the input kicked off a request to fetch results, which displayed the list again. There is already code to handle this case, but it was being applied when the input was focused rather than blurred. This PR inverts the logic for popovers, but keeps it the same for non-popovers. I believe this is because the input's blur event does not fire when a popover appears.

@camertron camertron marked this pull request as ready for review February 20, 2024 22:48
@camertron camertron requested a review from a team as a code owner February 20, 2024 22:48
@camertron camertron requested a review from keithamus February 20, 2024 22:49
@camertron camertron merged commit e9a7734 into main Feb 22, 2024
4 checks passed
@camertron camertron deleted the fix_firefox branch February 22, 2024 19:16
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.

2 participants