Skip to content

Inconsistent enter behavior #575

@bcye

Description

@bcye

When searching, it seems the Enter button has a different behaviour for different scenarios (especially when typing quickly):

  1. When the search page hasn't yet settled (or even loaded), the enter key (while typing, the search input focused) seems to do a browser navigation to search
  2. In the card view, after the results have completely loaded, pressing Enter causes a navigation to the exact match, if that exists
  3. In the table view, it causes the search page to be reloaded (when the text input is highlighted)

It seems that until the search results have settled the keydown propagates to the still highlighted search input whose behaviour seems to be from 1) and 3) to navigate to the search input.

I'd suggest that if the results have not settled or if the search input handles the key down, the page assumes that it will be an exact match and navigates to /search-term. The main problem with the current behavior is that if you type quickly and press enter, the site possibly first reloads, then you wait a second, press it again and get to the exact match.

Metadata

Metadata

Assignees

No one assigned

    Labels

    frontFrontend, Designhelp wantedExtra attention is needed

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions