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

Inconsistent behavior on Escape and Enter in debug mode #865

Open
sarahdayan opened this issue Jan 13, 2022 · 0 comments
Open

Inconsistent behavior on Escape and Enter in debug mode #865

sarahdayan opened this issue Jan 13, 2022 · 0 comments

Comments

@sarahdayan
Copy link
Member

Description

When debug=true and you close the panel while still having pending requests, the resulting behavior is different depending on how you closed the panel:

  • If you closed the panel with Escape, the panel stays closed
  • If you closed the panel with Enter, the panel reopens

This needs further investigations, but it's likely caused by different logic in the state reducer:

This behavior was initially observed in this followup.

Reproduction

Preview →

Steps

  1. Throttle your browser (e.g., slow 3G)
  2. Type and quickly hit Escape (before network requests are settled), see how the panel remains closed
  3. Type and quickly hit Enter (before network requests are settled), see how the panel reopens

Expected behavior

In both cases, the panel should stay closed even with debug enabled because these are intentional closing behaviors.

This might be questionable, and we may need to further specify how we want debug to behave (e.g., can you ever close the panel?)

Environment

  • OS: macOs Big Sur 11.5.1
  • Browser: Firefox 95.0.2
  • Autocomplete version: 1.5.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant