Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#11977 closed defect (invalid)

dijit.Form.FilteringSelect onChange bug when entering an invalid option

Reported by: untitled4 Owned by:
Priority: high Milestone: tbd
Component: Dijit - Form Version: 1.5
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by bill)

Hello,

the onChange method of FilteringSelect has a bug that it doesn't fire up the second time an invalid entry has been typed.

Sample code:

var foo = new dijit.form.FilteringSelect({
   onChange: function (value) {
      alert ('value changed');
   }
}, 'node');

User case: Enter an invalid option and move to the next field. The onChange method will fire and will alert "value changed". Go back to the input field and type another invalid option. The onChange method will not fire up this time, or on consecutive times. If you change to a valid option, the next time an invalid option is entered the onChange method will fire up again, but not on consecutive time.

The error in console: "Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMNSHTMLInputElement.selectionStart]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://mydomain.com/dojo/dojo.js :: anonymous :: line 38" data: no]"

Despite the value not being a valid option, I would still like to use the onChange method, but it's only reliable the first time an invalid option is entered.

Change History (3)

comment:1 Changed 9 years ago by bill

Description: modified (diff)

I don't get it, the first time onChange(undefined) will be called, and the second time onChange(undefined) will be called again? If the value went from undefined to undefined then it hasn't really changed, has it?

comment:2 Changed 9 years ago by Douglas Hays

Resolution: invalid
Status: newclosed

onChange is for the hidden value (is not changing) of the FilteringSelect?, not the displayedValue (is changing).

comment:3 Changed 9 years ago by bill

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