Success! Looks like we've fixed this one. According to our records the fix was applied for
a bug in our system
a recent build.
Ext GWT Premium Member
Cannot give focus to button on dialog
I am trying to give focus to the close button of a dialog, when the dialog is displayed. Nothing I do works. Once the dialog is displayed and I press space-bar or enter key, the main button's select event (that had the focus to display the dialog) is being called.
I have provided a test case. If you see comments in my overridden show method, I have tried a variety of ways on calling the focus() method for the button (directly, with scheduled deferred, with scheduled finally, etc).
Internet Explorer 8
Windows 7, 64 Bit
GWT 2.4 / Developer Mode
I have a TextButton with a SelectHandler. OnSelect a Dialog is created and show() is called.
Afaics, this should bring focus to the first Button of the ButtonBar of the Dialog. Thats NOT the case. Hitting spacebar creates and opens a similar Dialog, since focus is still on the TextButton I klicked.
Even calling focus on the Dialog or one of its Buttons in a deffered scheduler has no effect.
- GXT Version 3.0.0b
- FireFox 17.0.3
- Windows 7
This issue might be related to
Last edited by Andreas Samjeske; 6 Mar 2013 at 5:39 AM.
Reason: Referencing similar issue
Have you tried the setFocusWidget(Widget widget) method. It works for me to provide focus to widgets within a window/dialog. I also make use of the setTabIndex(int) for each of my widgets in the dialog/window to make sure tabbing flows correctly.
Yep, in the process of finding a workaround I discovered setPredefinedButtons() calls setFocusWidget(FirstOneofTheButtons). That leads to the issue stated above.
Originally Posted by GrecoRS4
Calling setFocusWidget(null) or setFocusWidget(AnyOtherWidgetNOTBeingAPredefinedButton) solves the issue.
I'm still having this issue. On load, none of the buttons are focused. I need to press TAB for the focus to go to the first button. Have you tried focusing on one of the buttons on load?
Which version of GXT are you using? I can reproduce the problem at http://www.sencha.com/examples/#ExamplePlace:dialog in 3.0.1, but not in 3.0.6 at http://qa.sencha.com:8080/examples-3...lePlace:dialog, so it appears to have been fixed.
I'm using 3.0.1. I can see from the release notes that this has been fixed in 3.0.3. I was just wondering if there is a workaround for 3.0.1
Not exactly a workaround: I managed to have the focus somewhere on my dialog by calling setFocusWidget(null) or setFocusWidget(AnyOtherWidgetNOTBeingAPredefinedButton)
Originally Posted by pacmendoza
Confirmed. Issue has been fixed.
Originally Posted by Colin Alworth
Yeah, I saw this in one of the previous posts. I can get the focus to the dialog using
but I need it to focus on the button. I'll wait for the update. Thanks!