Dimitrios Gianninas wrote:

I have a ComboBox and when it had focus, the user can select the correct item by using the up/down arrows. You would think hitting enter the key would cause an event to fire, or to trigger the click event on the default button of the current form (ex.: <Form defaultButton="btnSubmit"/>)... but it doesn't.

Hmm, yes. Actually the ComboBox uses the enter key to close the dropdown, but perhaps it should behave like the textinput (i.e. trigger the default action) when the dropdown is already closed.


Anyone have a work around?

Set a keydown listener on the combobox and fire the button's click in that:

keyDown="if (Key.getAscii() == Key.ENTER) okButton.dispatchEvent({type: 'click'})" />

Manish




Reply via email to