Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Filter: Filtering a SELECT element causes unexpected experience #6225
When I filter a select element as demo'd in the demos the select box goes blank if you choose anything but the first element.
Steps to reproduce: Enter in "CSS" into the filter box, hit Enter.
Expected Results: "CSS" is displayed instead of HTML. Additionally, "CSS" is the only option listed.
Platforms: Google Chrome 28 on Windows 8
Frameworks: jQuery 2.0.3, jQuery Mobile 1.4.0 alpha 1
Other Relevant information: This is also reproducible in the demos that come with the 1.4.0 zip file for the Filter Widget page. If you type in "Option B" you don't get a value in the dropdown box but when you click to expand you see both "Option B" and the last option "Option J"
The problem is that we copy classes from the selected option to the span that contains the select button text. On the test page "HTML" is the selected option. This option gets class
Let say we stop copying the classes or override the
If we keep copying the classes we could do something with CSS to give the button height. You won't see "HTML" anymore at all, but it is still the selected option so it will be submitted when you send the form.
Test page: http://jsbin.com/esekic/16 (Edit: updated the test page because the first example had wrong ID)
I think that both solutions are confusing.