Skip to content

fix(checkout): prevent places autocomplete dropdown from getting stuck open#717

Merged
dylandepass merged 1 commit into
staginguatfrom
fix-places-autocomplete-dismiss
Jul 15, 2026
Merged

fix(checkout): prevent places autocomplete dropdown from getting stuck open#717
dylandepass merged 1 commit into
staginguatfrom
fix-places-autocomplete-dismiss

Conversation

@dylandepass

Copy link
Copy Markdown
Contributor

Fixes #584

The autocomplete fetch is debounced at 300ms while the blur dismiss fires at 200ms. When a user clicks away before the fetch completes, blur runs first (no-op — dropdown doesn't exist yet) and the late fetch response then opens the dropdown with no further blur to close it. Clearing the debounce timer on blur prevents this race. A document-level mousedown listener provides an additional dismiss path when clicking outside the wrapper.

Test URLs:

…k open

The autocomplete fetch is debounced at 300ms while the blur dismiss fires at 200ms. When a user clicks away before the fetch completes, blur runs first (no-op — dropdown doesn't exist yet) and the late fetch response then opens the dropdown with no further blur to close it. Clearing the debounce timer on blur prevents this race. A document-level mousedown listener provides an additional dismiss path when clicking outside the wrapper.
@aem-code-sync

aem-code-sync Bot commented Jul 15, 2026

Copy link
Copy Markdown

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run all PSI checks
  • Re-run failed PSI checks
  • Re-sync branch
Commits

@aem-code-sync

aem-code-sync Bot commented Jul 15, 2026

Copy link
Copy Markdown
Page Scores Audits Google
📱 / PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI
🖥️ / PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

@dylandepass
dylandepass merged commit e715add into staginguat Jul 15, 2026
3 checks passed
@dylandepass
dylandepass deleted the fix-places-autocomplete-dismiss branch July 15, 2026 20:48
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.

1 participant