Opened 7 years ago

Closed 7 years ago

#17235 closed defect (wontfix)

[regression] dijit.form.Select throws invalid argument error in IE8 and IE10

Reported by: bemorris Owned by: Douglas Hays
Priority: undecided Milestone: 1.8.5
Component: Dijit - Form Version: 1.8.4
Keywords: Cc:
Blocked By: Blocking:

Description

The "invalid argument" error occurs when calling dijit.form.Select.removeOption. I debugged the code and I found the error occurs on the following line in _FormSelectWidget.getOptions:

if (!(a in option)
option[a] != valueOrIdx[a]) { == and not === so that 100 matches '100'

In IE8/10 the error happens because valueOrIndx contains "text", which is not found in the option element. I believe this line should be changed to the following:

if(!(a in option)
!(a in valueOrIdx) option[a] != valueOrIdx[a])

Change History (2)

comment:1 Changed 7 years ago by Douglas Hays

Milestone: tbd1.8.5
Owner: set to Douglas Hays
Status: newassigned
Summary: dijit.form.Select throws invalid argument error in IE8 and IE10[regression] dijit.form.Select throws invalid argument error in IE8 and IE10

worked in 1.7

comment:2 Changed 7 years ago by Douglas Hays

Resolution: wontfix
Status: assignedclosed

User's option array was being populated via:

options.push(domConstruct.create("option", {
	value: timestamp,
	label: this._generateOptionLabel(message, ts)
}));

instead of

options.push(new Option(this._generateOptionLabel(message, ts), timestamp));

which makes IE happier.

Note: See TracTickets for help on using tickets.