Opened 14 years ago

Closed 14 years ago

Last modified 11 years ago

#4633 closed defect (fixed)

ComboBoxMixin: two server transfers

Reported by: ptbrunet Owned by: ptbrunet
Priority: high Milestone: 1.0
Component: Dijit - Form Version: 0.9
Keywords: Cc: [email protected]
Blocked By: Blocking:


From Mark Hays...

In ComboBoxMixin in ComboBox.js there is

setDisplayedValue:function(/*String*/ value){

this._lastDisplayedValue = value; this.setValue(value, true);



case dojo.keys.ESCAPE:


if(this._lastDisplayedValue != this.getDisplayedValue()){

this.setValue(this._lastValueReported); this.setDisplayedValue(this._lastDisplayedValue); dojo.stopEvent(evt);




Do you absolutely need to call both setValue and setDisplayedValue in the escape code? In FilteringSelect, this causes two simultaneous queries to the server which will compete to set the corresponding values. You only need one of the functions to make both assignments.

Attachments (1)

4633a.patch (963 bytes) - added by ptbrunet 14 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 14 years ago by Adam Peller

Summary: ComboBoxMixin: two sever transfersComboBoxMixin: two server transfers

comment:2 Changed 14 years ago by ptbrunet

I sent a patch to Mark Hays. His response:

_lastDisplayedValue doesn't seem initialized when you first load a FilteringSelect so your patch fails when you click inside a FilteringSelect and escape, which unexpectedly blanks the input. Make sure you set _lastDisplayedValue somewhere in FilteringSelect and test FilteringSelect.

I fixed that and sent him another patch for review.

comment:3 Changed 14 years ago by Adam Peller

it might be helpful if the patches were simply attached to this ticket

Changed 14 years ago by ptbrunet

Attachment: 4633a.patch added

comment:4 Changed 14 years ago by ptbrunet

Patch attached.

comment:5 Changed 14 years ago by Becky Gibson

Resolution: fixed
Status: newclosed

(In [10872]) fixes #4633. Remove extra call to setValue() in escape key handling to prevent extra call to server. (commit for ptbrunet - IBM CLA)

comment:6 Changed 11 years ago by bill

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