caleywoods
8 Nov 2012, 2:16 PM
I have some code in a button handler that sets the focus to a combobox when clicked. When you click the button it correctly places the cursor inside the combobox which is configured to allow typing in the box.
When you TAB to the button and hit Enter on the keyboard, focus is set to the trigger of the dropdown and and you cannot type in the combobox since your cursor isn't placed in it. If you TAB to the button and hit space it works just as click does and places your cursor inside the combobox, ready to type.
I did a console.log on the event that happens when you click and hit Enter and it appears that an event of type "click" is fired when you hit Space or click the button but when you hit Enter it fires an event of type "keydown".
I tried to create a JSFiddle to illustrate this but every version of ExtJS I've tried on JSFiddle fires the click even for any kind of activation of the button (click mouse, hit Space, hit Enter).
Has anyone ever see this? I need to allow the user to hit Enter on the keyboard and have the cursor placed within the combobox for typing.
When you TAB to the button and hit Enter on the keyboard, focus is set to the trigger of the dropdown and and you cannot type in the combobox since your cursor isn't placed in it. If you TAB to the button and hit space it works just as click does and places your cursor inside the combobox, ready to type.
I did a console.log on the event that happens when you click and hit Enter and it appears that an event of type "click" is fired when you hit Space or click the button but when you hit Enter it fires an event of type "keydown".
I tried to create a JSFiddle to illustrate this but every version of ExtJS I've tried on JSFiddle fires the click even for any kind of activation of the button (click mouse, hit Space, hit Enter).
Has anyone ever see this? I need to allow the user to hit Enter on the keyboard and have the cursor placed within the combobox for typing.