hello,

I try to implement navigation in a table with the TAB key:

      table.addListener("keydown", function(e) {
          if(e.getKeyIdentifier() == "Tab"){
              table.stopEditing();
              var c = table.getFocusedColumn();
              var r = table.getFocusedRow();
              do{
                  if(c < tableModel.getColumnCount()-1) {
                      c += 1;
                  } else if(r < tableModel.getRowCount()-1) {
                      c = 0;
                      r += 1;
                  } else {
                      c = 0;
                      r = 0;
                  }
              } while(!(tableModel.isColumnEditable(c) && 
tcm.isColumnVisible(c)));
              table.setFocusedCell(c, r, true);
              table.startEditing();
              //error;
          }
      }, this);

But after this code is run, the focus doesn't stay in the table.
Strangely, if an error arise immediatly after "table.startEditing();", for 
example i put "error;", the TAB works quite well !

Is there a way that the table keeps the focus ?
Perhaps not cascading the event ? (i have try e.stopPropagation() with no 
success).

Regards.

Mikael Faujour.
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to