Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#12005 closed defect (worksforme)

Select: get('value') doesn't work twice after using set('value',newValue) on dijit.form.Select

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

Description

I have a method that first retrieves the current value of a dijit.form.Select using get(). Then, I change the selected value using set(). Later, that function is called again and the get() value is the old one even though the Select element has changed its value and displayed value.

function changeSelectedValue(){
var value = dijit.byID('selectElementID').get('value');
var newValue = anotherValidValue;

dijit.byID('selectElementID').set('value',newValue);
}

changeSelectedValue(); //This changes successfully the selected value.
//...some code here.
changeSelectedValue(); //This retrieves the old value instead of the new value.

Change History (3)

comment:1 Changed 9 years ago by bill

Summary: get('value') doesn't work twice after using set('value',newValue) on dijit.form.SelectSelect: get('value') doesn't work twice after using set('value',newValue) on dijit.form.Select

You'll need to attach a full (but small) self contained test case, thanks.

comment:2 Changed 9 years ago by Douglas Hays

Resolution: worksforme
Status: newclosed

no testcase and test_Select.html?mode=test tests a similar scenario successfully in 1.6.

comment:3 Changed 9 years ago by bill

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