Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#11687 closed defect (fixed)

dijit.form.Select does not allow creation without a selection (at least declaratively)

Reported by: iblanco Owned by: Douglas Hays
Priority: high Milestone: 1.6
Component: Dijit - Form Version: 1.5
Keywords: select unselect declarative Cc:
Blocked By: Blocking:

Description

When you create a dijit.form.Select declaratively and you don't mark a option with the selected attribute, the first one is automatically selected.

So in fact, although you can specify the widget as "required" it is not potentially possible (not at least declaratively) to have an "unselected" Select.

I tried by adding an empty option, or even an option with a empty value as the first option, and it certainly sets the form as not valid, but it doesn't go back to being valid when you select one of the other options.So, or specifying and empty option is not supported or there is a bug related to it.

Change History (5)

comment:1 Changed 9 years ago by Douglas Hays

Owner: set to Douglas Hays

comment:2 Changed 9 years ago by Douglas Hays

Milestone: tbd1.6
Status: newassigned

comment:3 Changed 9 years ago by Douglas Hays

Resolution: fixed
Status: assignedclosed

(In [23378]) Fixes #11687. Check both value and label == "" to distinguish a separator node from an empty option that has a   label but also has value == "". Added automated test to show that required is working. Adjusted some automated test timings to work on a slow machine. !strict

comment:4 Changed 9 years ago by Douglas Hays

(In [23400]) Refs #11687. Remove toJson call to resolve test failure.

comment:5 Changed 9 years ago by bill

Component: DijitDijit - Form
Note: See TracTickets for help on using tickets.