Page MenuHomePhabricator

It should not be possible to search when the search input is empty
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Quickly click on the search bar and off, then hover over the search box on the right and click it

What happens?:

What should have happened instead?:

I should have clicked on the search box and been able to search from the page I was on. Completely unexpected behavior for the search button to pop out of nowhere.

Software version (skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

Acceptance criteria

  • When the search input is empty then clicking the search button should do nothing.

Developer notes

  • The fix should be done inside the Codex library.

Event Timeline

Aklapper changed the task status from Open to Stalled.Dec 24 2022, 12:30 PM

Quicky hover over the search box on the right and click it

I cannot reproduce seeing a "Search" button suddenly appear just by mouse-over in Firefox 108 and Chromium 108 in Vector-2022.

You have to click on the search box and off first and then the effect will happen.

Jdlrobson changed the task status from Stalled to Open.Mar 21 2023, 5:42 PM
Jdlrobson subscribed.

I cannot reproduce seeing a "Search" button suddenly appear just by mouse-over in Firefox 108 and Chromium 108 in Vector-2022.

The concern here is if you click twice, to focus the search, instead of once you navigate away from the page. There is a mis-match between the non-Vue search and Vue search.

ovasileva subscribed.

Leaving to the design systems team for further review. Two options that came up:

  • Always showing search button
  • Not allowing for search when the text box is blank

We think this is in the realm of the design systems team. Two possible options are 1) make the button disabled state when the input is empty 2) showing the button at all times

Jdlrobson renamed this task from Clicking on search box unexpecedly brings me to Special:Search to It should not be possible to search when the search input is empty.EditedApr 27 2023, 8:14 PM
Jdlrobson updated the task description. (Show Details)

Web team discussed this with DST and we agree this is a bug and web team will fix this. Possible solutions include adding a required property to the input or adding some JavaScript that checks the value of the search. DST team will provide support for code review.

Noting that this might be addressable with the required attribute on the input element, <input required/>

Screenshot 2023-04-27 at 4.14.36 PM.png (301×596 px, 25 KB)

Not allowing for search when the text box is blank

I routinely use the search box when it's empty to get to Special:Search trivially.

I do too.

How about just showing the search button when there's text in the search box, and not showing it when there's not.

@Izno @Lectrician1 what if this was made more obvious behaviour e.g. when focusing the search a link to special:search displayed ?

Screenshot 2023-05-03 at 11.27.04 AM.png (117×548 px, 10 KB)

@Izno @Lectrician1 what if this was made more obvious behaviour e.g. when focusing the search a link to special:search displayed ?

Screenshot 2023-05-03 at 11.27.04 AM.png (117×548 px, 10 KB)

I guess I should explain what I'm doing just a bit more. I click the search box and then hit enter usually, rather than the search button. I imagine the keyboard-exclusive users have a similar path.

I do not know if I would click on a dropdown. Not to say that it's a bad idea, but I do kind of think it's just working around a non-problem in some respects. So in that respect I guess I disagree that the current task title is in fact an issue.

@ovasileva I'd be tempted to decline this ticket since it's a mild annoyance in exchange for a feature that is apparently useful. What do you think?

Jdlrobson claimed this task.
Jdlrobson added a subscriber: CCiufo-WMF.

@CCiufo-WMF pointed out this was fixed by the decision made in T338957