> > You might try something like this to force focus where you want > > it to be: > > > > contextmenu.addEventListener("appear", function() { > > table.setFocus(); }, this); > > The trouble with that is that when the menu appears, the up and down > arrow will work in the table rather than in the menu. > > I can remember the element that initiated the action and set focus > explicitly back to that after the menu has disappeared.
I've tried this by putting this in _beforeAppear for the context menu class: var oFocusRoot = qx.event.handler.EventHandler.getInstance().getFocusRoot(); var oTarget = oFocusRoot == null ? null : oFocusRoot.getActiveChild(); this._m_oOldTarget = oTarget; and then this in _afterDisappear: if (this._m_oOldTarget && this._m_bIsContextMenu) { this._m_oOldTarget.setFocused(true); } However, it's not ideal. The main control we have is a table. Before the context menu is shown the keyboard focus is on the qx.ui.table.Table class. The target found by the getActiveChild() call is an instance of qx.ui.table.pane.Pane. Consequently the highlight colour for focus isn't displayed correctly, but the keyboard does work correctly on the table (e.g. pressing up selects the next line up). Is this area being worked on in 0.8? Hugh ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel