question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow searching with 1 or 2 characters when JavaScript disabled

See original GitHub issue

Describe the problem and steps to reproduce it:

What happened?

  • Searching is blocked by front-end, a tool-tip is shown, which ask user to input at least 3 characters.
  • Manually changing URL to perform a 2 characters search works fine. So this is not a limitation by backend server. (example: https://addons.mozilla.org/en-US/firefox/search/?q=百度 )
  • Update: browser built-in about:addons page allow searching with only 1 character.

What did you expect to happen?

It should allow user to perform a 2 characters search.

Anything else we should know?

It seems this change is involved by #4532, and @tofumatt asked to config this value as 3 instead of 2. Most Chinese words are two characters (about 70% ~ 85%), and many Chinese web sites use two characters name. It would be common and reasonable to perform a searching with 2 characters for Chinese language user. (I’m not sure about other languages, but maybe it also applied to some other East-Asian language.) So I would prefer this value to be 2. Or maybe no limitation if it won’t break searching backend. Auto completion would be another thing which I don’t care whether it require at least 3 or 5 letters.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
tianshcommented, Mar 16, 2019

I think there should be a validation in js too.

So, maybe 2 should be fine.

0reactions
ioanarusiczkicommented, Apr 30, 2019

@willdurand Search suggestions begin when 2 chars are typed in instead of 3 (as it used to be). I filed a minor followup issue for the tooltip - https://github.com/mozilla/addons-frontend/issues/7604

dev versus prod

dev versus prod

Read more comments on GitHub >

github_iconTop Results From Across the Web

Enabling the Search button when the user types or makes a ...
I'd like to write some sort of function that would allow functionality to be added to enable the "Search" button when the user...
Read more >
How to disable or enable buttons using Javascript and jQuery
Learn how to enable or disable buttons using javascript and jQuery based on whether the input field is filled or empty.
Read more >
<input type="search"> - HTML: HyperText Markup Language
A Boolean attribute which, if present, means this field cannot be edited by the user. Its value can, however, still be changed by...
Read more >
Places Library | Maps JavaScript API - Google Developers
Search for Places API, then select it from the results list. Select ENABLE. When the process finishes, Places API appears in the list...
Read more >
HTML DOM Input Text disabled Property - W3Schools
Definition and Usage. The disabled property sets or returns whether a text field is disabled, or not. A disabled element is unusable and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found