Opened 2 years ago

Closed 2 years ago

#15098 closed bug (fixed)

Selectmenu ignores hidden attribute

Reported by: PVM 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.

Change History (2)

comment:1 Changed 2 years ago by Scott González

Component: ui.coreui.selectmenu
Milestone: none1.12.2
Status: newopen
Summary: jQuery-UI doesn't recognize HTML5's hidden attributeSelectmenu ignores hidden attribute

comment:2 Changed 2 years ago by Scott González

Resolution: fixed
Status: openclosed
Note: See TracTickets for help on using tickets.