var k = e.getKey(), r = s.cell[0], c = s.cell[1];
var newCell, forward=false;
- if (this.enter_is_tab && k == e.ENTER) {
- k = e.TAB;
- }
+
switch(k){
case e.TAB:
this.select(newCell[0], newCell[1]);
e.stopEvent();
- } else if (forward) {
- // tabbed past last
- this.fireEvent('tabend',this);
}
},
*/
onEditorKey : function(field, e){
- var k = e.getKey(), newCell, g = this.grid, ed = g.activeEditor;
+ var k = e.getKey(),
+ newCell,
+ g = this.grid,
+ ed = g.activeEditor,
+ forward = false;
///Roo.log('onEditorKey' + k);
- if (!ed) {
-
-
-
+
+
+ if (this.enter_is_tab && k == e.ENTER) {
+ k = e.TAB;
}
+
if(k == e.TAB){
if(e.shiftKey){
newCell = g.walkCells(ed.row, ed.col-1, -1, this.acceptsNav, this);
}else{
newCell = g.walkCells(ed.row, ed.col+1, 1, this.acceptsNav, this);
+ forward = true;
}
e.stopEvent();
if(newCell){
//Roo.log('next cell after edit');
g.startEditing.defer(100, g, [newCell[0], newCell[1]]);
+ } else if (forward) {
+ // tabbed past last
+ this.fireEvent('tabend',this);
}
}
});
\ No newline at end of file