views:

87

answers:

1

Hi, In my gwt app, on some screens, I create a dialogbox with an input form. I would like to be able to use the tabindex property but only within that dialog box. (ie: cycles first to last field of that dialog box only) Right now if I press tab when the last field is selected, the focus will move onto the first tab index that happens to be an item behind the dialog box (set as glass). This is quite annoying as one now has to tab several times until the focus returns to the first dialog box field. Setting the dialog box to modal is even worse as as soon as you tab outside the dialog box, the tab key gets ignored since objects outside the dialog box no longer receive keyboard events (can't tab out!). Is my only option to listen for the tab key and handle tabbing manually? I would be fine with tabbing going outside my app and onto the url bar (for example) as long as it returns to my dialog box without having to go through all the elements under it.

A: 

Well, after almost a month without an answer, I decided to go with manual tab key handling. Works like a charm but it now ignores the url bar in the tab cycle (fine by me). I used this blog post to get going: http://albertattard.blogspot.com/2009/11/capturing-tab-key-in-gwt-textarea.html I simply added a focus panel at the root of my dialog.

zeno490