#14985 closed defect (duplicate)
dijit.form.RadioButton set checked priorityChange bugs
Reported by: | vtsuper | Owned by: | Eugene Lazutkin |
---|---|---|---|
Priority: | undecided | Milestone: | 1.5.3 |
Component: | DojoX Form | Version: | 1.5 |
Keywords: | Cc: | ben hockey | |
Blocked By: | Blocking: |
Description
accroding to the following example, I found that there are some bugs on radioButton
http://jsfiddle.net/vtsuper/3HJWe/9/
when I press setFromValues button, data pass to the dijit. Since setFormValues call XXX.set('value','YYYY', false) so normally it won't trigger any event. It works in most dijit except radioButton. From the example you can see the log was trigger by radioButton
In dojox.form.manager_Mixin.js
formWidgetValue:function(){
array.forEach(elem, function(widget){
widget.set("checked", false, !this.watching);
});
array.forEach(elem, function(widget){
widget.set("checked", widget.value === value, !this.watching);
}); }
I think the problem is come from this function
Change History (7)
comment:2 Changed 9 years ago by
Cc: | ben hockey added |
---|---|
Component: | Dijit - Form → DojoX Form |
Owner: | changed from Douglas Hays to Eugene Lazutkin |
Status: | new → assigned |
Version: | 1.6.0 → 1.5 |
Refs #11284. The problem is in dojox/form/manager/_Mixin.js.
"this.watching" is undefined within
array.forEach(elem, function(widget){ widget.set("checked", false, !this.watching); }); array.forEach(elem, function(widget){ widget.set("checked", widget.value === value, !this.watching); });
comment:3 Changed 9 years ago by
Resolution: | → duplicate |
---|---|
Status: | assigned → closed |
comment:5 Changed 9 years ago by
Milestone: | tbd → 1.5.3 |
---|
I can provide more information about this case. the problem should be come from here
dojox.form.manager setFromValue -> formWidgetValue ->
but actually in _RadioButtonMixin.js , it won't handle the priorityChange flag so it always trigger the observer function. so how to solve this case?
Replying to vtsuper: