In my client-side event handler for the OnClientTextChange event, I've added code that under certain circumstances sets the text of the combobox to the empty string and cancels the server-side TextChanged event by calling client-side EventArgs.set_cancel(true). This has created the following situation:
- User enters some text in the combobox, say "David", and hits enter, firing the search
- The user performs the action in the combo that causes my client-side code to cancel the server-side TextChanged event
- The user then enters "David" in the combobox again and hits enter, but neither the client- or server-side TextChanged events fire.
I think that cancelling the server-side TextChanged event is keeping the text as "David" even though I'm setting the text to the empty string in the OnClientTextChange event and the combobox properly shows the empty string. The combobox still thinks its text is "David" and is thus not re-firing the search. If I delete the last "d", everything fires as expected.
Is this supposed to work this way, and if so, could someone suggest a workaround?