View Full Version : handling 2 key-listener for 1 combobox

13 Jan 2012, 9:58 AM
I don't find a solution for my event problem and hope to find an idea here.

I have one specialkey listener and keyup listener for the same combobox and need a way that there “talk” with each other.

We have a searchform where we use an extended combobox that works as an autocomplete suggestbox. This one has a keyup listener to load the suggest list and so on and works fine.

On one searchform we like to add an additional listener to submit the form when you hit the enter key while in focus of this field.

The problem now is to “synchronize” the 2 handlers. We don’t want to submit the form if you are selecting just a value in the combobox with the enter key. But we like to submit when you previously already select one or don’t select at all and just want to search.

How can we “filter” out the real Search Enter Event that no other handler used.

PS: we don’t like to handle the submit in the extended combobox because this is used in other panels also where we don’t want to submit ;-)

We are on ExJS 3


13 Jan 2012, 11:20 AM
The easiest method is for one to set a property on the combobox and the other look for it.