Opened 14 years ago

Last modified 10 years ago

#5970 closed defect

ComboBox: with autocomplete=true, race condition when typing too fast — at Version 3

Reported by: guest Owned by: Douglas Hays
Priority: high Milestone: 1.1
Component: Dijit - Form Version: 1.0
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by bill)

there is an example for using it with FilteringSelect? here: http://www.dojotoolkit.org/book/book-dojo/part-3-javascript-programming-dojo-and-dijit/using-dojo-data/available-stores/dojox-d

as a result of each server request the text in the FilteringSelect? is being replaced, and if the user types too fast (actually while the server request is on the go), it messes up the text in the FilteringSelect?.

Change History (3)

comment:1 Changed 14 years ago by bill

Synchronous requests are almost never a good idea, since the lock up the UI. ComboBox? shouldn't fail just because the user keeps typing while the XHR is executing. Can you be more specific than "it messes up the text"? What happens exactly? (You can give an example.)

comment:2 Changed 14 years ago by guest

i have a list of the cities in israel.

when i type: "GO", i get the following list in the popup: GONEN GOREN GRANOT HAGALIL

at this moment, the text in the input is: "GONEN", while "NEN" (the last 3 letters) are selected.

BUT: if i type: "GO" too fast, the text in the input is "GONEN" (as expected), but the WHOLE word is selected. the next momet i type "R" (the third letter of "GOREN") and the whole text in the input is replaced by "R"...

from the client point of view it's almost identical to the nominted example. the only difference is that i used requestMethod="post" (instead of requestMethod="get"). i don't think it should make any difference, right?

at the server side i have a servlet that parse the "postData", and response with the appropriate JSON-formated result.

i hope this helps, and i'll be happy to supply more info in case needed. ewilde.

comment:3 Changed 14 years ago by bill

Component: DojoX DataDijit
Description: modified (diff)
Milestone: 1.1
Owner: changed from Jared Jurkiewicz to Douglas Hays
Summary: dojox.data.QueryReadStore - an option to make synchronized xhr callsComboBox: with autocomplete=true, race condition when typing too fast

Hi ewilde, thanks for that explanation, that's pretty good. It shouldn't matter whether you use GET or POST, but I suppose that affecting some sort of race condition. I'm considering this a bug with ComboBox?, so setting as a dijit bug.

Note: See TracTickets for help on using tickets.