Scratch-www: Clicking the search icon without searching anything shows an empty page

Created on 25 May 2021  路  4Comments  路  Source: LLK/scratch-www

Clicking the magnifying glass icon without enter anything into the search bar shows an empty page (https://scratch.mit.edu/search/projects) instead of just focusing the search bar.

Steps to Reproduce

Click the icon in the search bar without entering anything into it.

Operating System and Browser

Edge 90 on Windows

Low Impact Low Severity priority 4

Most helpful comment

There are two awkward / confusing behaviors which both stem from not validating if any text has been entered into the text field prior to initiating the search.

When the search field contains no text and...

  1. ... clicking the search icon (magnifying glass) results in loading a search page with not results
  2. ... pressing the Return key to initiate a search while the search field is focused results in loading a search page with not results

In both cases we should not initiate a search unless there is text in the field.

All 4 comments

Is this even really a bug? I mean, the button is meant to search for what you have typed in and if you have nothing typed in, it searches for nothing...

Is this even really a bug? I mean, the button is meant to search for what you have typed in and if you have nothing typed in, it searches for nothing...

I think it still should filter that

@AmazingMech2418 The behavior is confusing. One might thing that the icon needs to be clicked to search.

There are two awkward / confusing behaviors which both stem from not validating if any text has been entered into the text field prior to initiating the search.

When the search field contains no text and...

  1. ... clicking the search icon (magnifying glass) results in loading a search page with not results
  2. ... pressing the Return key to initiate a search while the search field is focused results in loading a search page with not results

In both cases we should not initiate a search unless there is text in the field.

Was this page helpful?
0 / 5 - 0 ratings