Page MenuHomePhabricator

[minor-wmf.25] MediaSearch - no input focus for loading empty results page
Closed, ResolvedPublic

Description

Found when verifying T215117: [S] Don't focus on search input when displaying search results in Special:Search.

  1. As an anon user or a user with MediaSearch set as default, go to any page on commonsw wiki.
  2. Click on the search icon in the Search text box or type there - Special:MediaSearch
  3. Special:MediaSearch page will be displayed - the input field won't have a focus, so a user is not able to start typing.

Note: That MeidaSearch behavior is different from Special:Search. If a user with default Special:Search (or by entering Special:Search in the input field) goes to Special:Search page without any results, the Special:Search page will display the focus in the search input field.

Event Timeline

Assuming this task is about the SDAW-MediaSearch code base, hence adding that project tag so other people who don't know or don't care about teams in some organization can also find this task when searching via projects. Please set appropriate code base project tags. Thanks!

Change 883175 had a related patch set uploaded (by Stephane Rebai; author: Stephane Rebai):

[mediawiki/extensions/MediaSearch@master] T316174 set focus on input when Media:Search loads

https://gerrit.wikimedia.org/r/883175

focus added on no-JS context
also added with JS context but needs confirmation before submitting patch

Change 918420 had a related patch set uploaded (by Simone Cuomo; author: Simone Cuomo):

[mediawiki/extensions/MediaSearch@master] MediaSearch - no input focus for loading empty results page

https://gerrit.wikimedia.org/r/918420

Change 883175 abandoned by Simone Cuomo:

[mediawiki/extensions/MediaSearch@master] T316174 set focus on input when Media:Search loads

Reason:

A follow up patch has been created to solve this issue

https://gerrit.wikimedia.org/r/883175

Change 918420 merged by jenkins-bot:

[mediawiki/extensions/MediaSearch@master] MediaSearch - no input focus for loading empty results page

https://gerrit.wikimedia.org/r/918420

Checked commons wmf.9 - the issue is fixed.