},
onSpecialKey : function(field, e){
+ //Roo.log('editor onSpecialKey');
if(this.completeOnEnter && e.getKey() == e.ENTER){
e.stopEvent();
this.completeEdit();
// private
fireKey : function(e){
+ Roo.log('field ' + e.getKey());
if(e.isNavKeyPress()){
this.fireEvent("specialkey", this, e);
}
// private
initEvents : function(){
- this.el.on(Roo.isIE ? "keydown" : "keypress", this.fireKey, this);
+ // safari killled keypress - so keydown is now used..
+ this.el.on("keydown" , this.fireKey, this);
this.el.on("focus", this.onFocus, this);
this.el.on("blur", this.onBlur, this);
/** @ignore */
handleKeyDown : function(e){
+ Roo.log('Cell Sel Model handleKeyDown');
if(!e.isNavKeyPress()){
return;
}
var newCell;
switch(k){
- case e.TAB:
- if(e.shiftKey){
+ case e.TAB:
+ // handled by onEditorKey
+ if (g.isEditor && g.editing) {
+ return;
+ }
+ if(e.shiftKey){
newCell = walk(r, c-1, -1);
- }else{
+ }else{
newCell = walk(r, c+1, 1);
- }
+ }
break;
case e.DOWN:
newCell = walk(r+1, c, 1);
},
onEditorKey : function(field, e){
+
var k = e.getKey(), newCell, g = this.grid, ed = g.activeEditor;
+ Roo.log('onEditorKey' + k);
+
if(k == e.TAB){
if(e.shiftKey){
newCell = g.walkCells(ed.row, ed.col-1, -1, this.acceptsNav, this);
if(newCell){
+ Roo.log('next cell after edit');
g.startEditing.defer(100, g, [newCell[0], newCell[1]]);
}
}