1

I was wondering why the default select tag of HTML, for example:

<select name="company_name">
    <option value=""></option>
    <option value="1">Company 1</option>
    <option value="2">Company 2</option>
    <option value="3">Company 3</option>
    <option value="4">Company 4</option>
    <option value="5">Company 5</option>
    <option value="6">Company 6</option>
</select>

is not searchable by default. Of course this is a browser feature, but it is just really weird that none browser (as far as I know) doesn't have it.

Am I missing something here? Is there any browser that actually have as default a searchable select tag? Is it so complicated to achieve it, or is it just that people doesn't want it? Is this a problem with OS?

I know that I can achieve that easily with JavaScript (e.g. Jquery Chosen plugin... e.t.c.) but I was wondering if there is any plan for popular browsers like firefox and chrome to have it as default.

The result that I am expecting is like the below image on Windows: enter image description here

2
  • 3
    HTML was not originally designed to produce full blown UIs. The people who designed the select tag likely expected people to use it for a few hard-coded options, not lists with hundreds of items. By the time that kind of thing came under consideration, HTML was rarely hand-edited and so adding it would be mostly pointless. (Since adding something to HTML affects many different browsers. Commented May 24, 2014 at 18:35
  • @StevenBurnap can you copy your answer so I can accept it as correct? The only reason that I've asked is that nowadays especially in chrome the input fields are changing a lot. For example there is input type numeric with up and down, there is input that is validating the email,numbers... e.t.c. and have a tooltip at the top to inform you that your value is incorrect. So that's why I thought that this is an easy UI change, compare to other things that the browsers are already doing. Commented May 24, 2014 at 21:25

1 Answer 1

2

Dropdowns are semi-searchable in chrome and firefox. Just start typing and it will jump to option that matches typed text. You probably didn't notice it in your example since all options start with same text and pressing space finishes the searching.

Example at http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_select

1
  • 1
    Space doesn't finish the searching (at least with multi-selects), I regularly use it with multiple words in Firefox Commented May 25, 2014 at 5:27

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.