Skip to content

Close detached modal after navigation #547

@cmfcmf

Description

@cmfcmf

Description

The detachted modal does not close after navigating to an item if the navigation does not change the page.
This happens when the user is already on the page corresponding to the search result, and they use keyboard navigation to select a search result.

Reproduction

https://codesandbox.io/s/polished-shadow-1jsh0?file=/app.tsx

Steps

  1. Search for something
  2. Use your keyboard to navigate to a search result
  3. Hit enter

Expected behavior

The detached modal closes (instead only the search results vanish, but the modal remains open).

Environment

  • OS: Windows
  • Browser: Chrome
  • Autocomplete version: ^1.0.0-alpha.46

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions