HTML <optgroup disabled="disabled"> doesn't disable the group's <options> in the widget

23 views
Skip to first unread message

jmpi...@gmail.com

unread,
Sep 29, 2016, 12:17:14 PM9/29/16
to select2
In HTML, I can write:
<select id="selActionsTop">
<option>Select one</option>
<option>Show product details</option>
<optgroup label="For selected products:" disabled="disabled">
<option>Edit contact 1</option>
<option>Edit contact 2</option>
<option>Edit contact 3</option>
<option>Edit location</option>
<option>Remove</option>
<option>View inventory reports</option>
</optgroup>
</select>

And the optgroup and all of its sub-options will be disabled in the native browser form control. However, when I apply select2() to the SELECT, the rendered widget only has the OPTGROUP item itself disabled, not its child OPTIONs.

Also, at least in this particular situation, the widget's width seems not to account for the child OPTIONs (the final child OPTION's title wraps in the rendered widget).

Is this a known issue?

Reply all
Reply to author
Forward
0 new messages