Using keyboard in search field sometimes navigates to search results rather than selected item
Summary
When selecting an autocomplete option in the site-wide search field with the keyboard, sometimes you're directed to the selected page, but often you're directed to the /search
page.
Steps to reproduce
- Enter a query in the site-wide search field that returns project results
- Use keyboard
down
to select a project - Press keyboard
enter
Expected behavior
User always always navigated to the selected project page.
Actual behavior
User is sometimes navigated to the selected project page but is often navigated to /search?utf8=✓&search=$QUERY&group_id=&project_id=&repository_ref=
. Sometimes they're navigated to the project page briefly, but then quickly renavigated to the search page.
Relevant logs and/or screenshots
Pressing enter should take us to directly to Html5 Boilerplate.
Output of checks
Can be seen on seen on gitlab.com (8.12.3-ee 54ec1a6e)
Possible fixes
The default behavior for the search field should be prevented when pressing enter
in the autocomplete UI