PDA

View Full Version : [2.0b1][SOLVED] Hitting ESC in an editable field causes grid to move to position 0



jay@moduscreate.com
23 Oct 2007, 5:06 PM
using the examples, default editor grid. In FF2.x for mac, works fine in safari

scroll down, dbl click a field, hit ESC.

http://tdg-i.com/img/extjs/editor_grid_esc_issue.swf

jsakalos
28 Oct 2007, 9:15 PM
Confirmed. Same in FF@Linux. We'll take a look.

jay@moduscreate.com
29 Oct 2007, 3:25 AM
thanks saki. I found issues where enter would do the same thing but i'll be honset, i can't reproduce all the time.

aconran
16 Nov 2007, 7:08 AM
Could you please try this override and let me know if it resolves the problem?



Ext.grid.CellSelectionModel.override({
onEditorKey : function(field, e){
var k = e.getKey(), newCell, g = this.grid, ed = g.activeEditor;
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);
}
e.stopEvent();
}else if(k == e.ENTER){
ed.completeEdit();
e.stopEvent();
}else if(k == e.ESC){
e.stopEvent();
ed.cancelEdit();
}
if(newCell){
g.startEditing(newCell[0], newCell[1]);
}
}
});

aconran
17 Nov 2007, 9:54 AM
Resolved in Revision 1413 of SVN.