Opened 8 years ago

Closed 8 years ago

#14782 closed defect (invalid)

FilteringSelect: intermediateChanges not propagated to the outside

Reported by: Paul Christopher Owned by: Douglas Hays
Priority: undecided Milestone: tbd
Component: Dijit - Form Version: 1.7.1
Keywords: Cc:
Blocked By: Blocking:

Description

Description

In my custom FilteringSelect, I have set intermediateChange=true by default. Moreover I have overridden the onChange method (which simply does a console.log("onChange (inside)");). This works nicely. Everytime I change the widget's value, the event is fired -- as expected.

But within the ready function of the main html file, I have also connected to this very custom FilteringSelect in question using on(node, "change", function(){console.log('onChange (outside));}). Intermediate changes are not propagated to this callback. The outside callback is only fired when the widget looses focus and the value has changed.

Steps to reproduce the issue

Run the attached test case and watch the console output while typing. Only intermediate changes "from inside" are fired and not "from the outside". I.e.: For the "outside", intermediateChanges seems still to be set to "false".

Discussion

Apparently this used to work, see http://davidwalsh.name/dijit-intermediatechanges

Attachments (1)

testFilteringSelect.zip (1.7 KB) - added by Paul Christopher 8 years ago.

Download all attachments as: .zip

Change History (2)

Changed 8 years ago by Paul Christopher

Attachment: testFilteringSelect.zip added

comment:1 Changed 8 years ago by bill

Resolution: invalid
Status: newclosed

As a "defect" this ticket is invalid, because in your example code, you are calling dom.byId() when you should be calling dijit.byId(). Your test file does:

on(dom.byId('field1'), "change", function(){
	console.log('onChange (outside)');
});

It should be:

on(dijit.byId('field1'), "change", function(){
	console.log('onChange (outside)');
});

Or even better:

dijit.byId('field1').on("change", function(){
	console.log('onChange (outside)');
});

Having said that, I may support the syntax you tried in the future, as part of the work on #13785.

Also, thanks for the test case, but in the future please attach as a single HTML file rather than an entire ZIP. Thanks.

Last edited 8 years ago by bill (previous) (diff)
Note: See TracTickets for help on using tickets.