Skip to main content

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 scottgonzalez comment:1

component: ui.coreui.selectmenu
milestone: none1.12.2
status: newopen
summary: jQuery-UI doesn't recognize HTML5's hidden attributeSelectmenu ignores hidden attribute

Changed November 16, 2016 05:54PM UTC by scottgonzalez comment:2

resolution: → fixed
status: openclosed