Search and Top Navigation
#15098 closed bug (fixed)
Opened November 15, 2016 11:05AM UTC
Closed November 16, 2016 05:54PM UTC
Selectmenu ignores hidden attribute
Reported by: | pvermees | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.12.2 |
Component: | ui.selectmenu | Version: | 1.12.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Using plain Javascript, it is easy to hide a select-menu option using HTML5's hidden attribute. But when stylising the select-menu using the jQuery-UI, the hidden attribute is ignored. For example, define two select menus:
<select id="one"> <option>option 1</option> <option>option 2</option> <option hidden>hidden option</option> <option>option 4</option> </select> <select id="two"> <option>option 1</option> <option>option 2</option> <option hidden>hidden option</option> <option>option 4</option> </select>
using the following Javascript/jQuery:
$(function(){ $('#one').selectmenu(); });
When you run this example, the third item is hidden in the second selectmenu, but not in the first. It seems that jQuery-UI has disabled the hidden attribute. See
http://jsfiddle.net/pvermees/xa4219ya/1/
for a live example of this issue.
Attachments (0)
Change History (2)
Changed November 16, 2016 05:52PM UTC by comment:1
component: | ui.core → ui.selectmenu |
---|---|
milestone: | none → 1.12.2 |
status: | new → open |
summary: | jQuery-UI doesn't recognize HTML5's hidden attribute → Selectmenu ignores hidden attribute |
Changed November 16, 2016 05:54PM UTC by comment:2
resolution: | → fixed |
---|---|
status: | open → closed |
Fixed in a2b25ef6caae3e1a272214839b815a6387618124.