Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trim search query to prevent searching for empty string #316

Merged
merged 2 commits into from Feb 3, 2021
Merged

Conversation

stephanebisson
Copy link
Collaborator

Phabricator Link: https://phabricator.wikimedia.org/T272276

Problem Statement

Searching for empty string returns no results

Solution

Trim the search query and only search if it is not empty

Note

@hueitan
Copy link
Member

hueitan commented Feb 1, 2021

I think these two scenarios are fine

  1. Type , then hit back key, it shows exit confirm dialog, cancel the dialog will remove all
  2. Type , then type another digit a, will clear previous

@hueitan
Copy link
Member

hueitan commented Feb 1, 2021

what about this case

  1. Type president obama
  2. user want to research for president xxx, then he deletes obama
  3. Once the cursor reach o, hit delete will bring the cursor to t, not the empty space there

@jpita jpita merged commit a641214 into master Feb 3, 2021
@jpita jpita deleted the trim-query branch February 3, 2021 23:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants