Opened 10 years ago

Closed 9 years ago

Last modified 8 years ago

#10594 closed defect (fixed)

[patch] [cla] dijit.form.Select::attr('value', 'something', FALSE) fires onChange even when the priorityChange==FALSE

Reported by: s van gemmert Owned by: ben hockey
Priority: high Milestone: 1.6
Component: Dijit - Form Version: 1.4.0
Keywords: Select onChange Cc:
Blocked By: Blocking:

Description

dojo: version 1.4.0

when calling

dijit.form.Select::attr('value', 'something', FALSE)

with the "priorityChange" param explicitly set to FALSE, the onChange event should not be triggered This example shows that the Select widget does trigger the onChange in such a case. This seems to be caused by the _handleOnChange call in dijit.form.Select::_updateSelection. By setting the priorityChange to False there solves the problem. But it seems like the whole call to _handleOnChange can be removed there...

Attachments (2)

SelectBug.html (4.3 KB) - added by s van gemmert 10 years ago.
code to reproduce
10594.diff (362 bytes) - added by ben hockey 9 years ago.

Download all attachments as: .zip

Change History (10)

Changed 10 years ago by s van gemmert

Attachment: SelectBug.html added

code to reproduce

comment:1 Changed 10 years ago by bill

Owner: set to Nathan Toone

comment:2 Changed 9 years ago by Nathan Toone

Owner: Nathan Toone deleted

Unassigning my tickets.

comment:3 Changed 9 years ago by ben hockey

Summary: dijit.form.Select::attr('value', 'something', FALSE) fires onChange even when the priorityChange==FALSE[patch] [cla] dijit.form.Select::attr('value', 'something', FALSE) fires onChange even when the priorityChange==FALSE

i've just noticed this same problem in 1.5 beta and also had figured out the same fix - remove the call to _handleOnChange in _updateSelection. i've attached a patch for it and all the unit tests still pass with the change but i'm not familiar enough with this widget to be sure it won't break anything.

if someone else will take a look at it, they can either apply the patch or let me know to do it. hopefully if it doesn't make 1.5.0 it could make 1.5.1

Changed 9 years ago by ben hockey

Attachment: 10594.diff added

comment:4 Changed 9 years ago by ben hockey

Owner: set to ben hockey

comment:5 Changed 9 years ago by ben hockey

Milestone: tbd1.5.1

comment:6 Changed 9 years ago by bill

Milestone: 1.5.11.6

I talked to neonstalwart about this on IRC. The patch looks good, although I don't think it's critical enough to go into a point release. I'll mark it for 1.6 for now although I don't mind it going into 1.5 if it's put in before the RC which will theoretically happen on Monday.

comment:7 Changed 9 years ago by ben hockey

Resolution: fixed
Status: newclosed

(In [22542]) prevent onChange from firing when priorityChange is false and added a test for this. fixes #10594 !strict

comment:8 Changed 8 years ago by bill

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