You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When someone currently presses the `/` key to let the search box get the
focus, and then immediately presses the Enter key without typing a
search term, the site currently redirects to
https://git-scm.com/undefined.
The same happens when the search term consists of only one character.
That's because it is somewhat unexpected that anybody would want to see
_all_ search results before seeing _some_ search results.
Let's fix that.
Incidentally, this also helps with adding a test that verifies that
hitting Enter in the search box will never direct the browser to that
`/undefined` URL, no matter how quickly that search term and the Enter
key are provided: The `runSearch()` function triggers on key-up, which
Playwright's `fill()` method (which can be used to fill in a search
term) does not emit.
Signed-off-by: Johannes Schindelin <[email protected]>
0 commit comments