X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/3789b528d8dd8aad4558e38e22d775bcab1cbd36..6746dc89c47ed01b165cc1152533605f97eb8e8d:/docs/source/CellEditing.html diff --git a/docs/source/CellEditing.html b/docs/source/CellEditing.html index f04e2e7b..6d449e80 100644 --- a/docs/source/CellEditing.html +++ b/docs/source/CellEditing.html @@ -79,7 +79,7 @@ Ext.define('Ext.grid.plugin.CellEditing', { alias: 'plugin.cellediting', extend: 'Ext.grid.plugin.Editing', - requires: ['Ext.grid.CellEditor'], + requires: ['Ext.grid.CellEditor', 'Ext.util.DelayedTask'], constructor: function() { /** @@ -162,6 +162,12 @@ grid.on('validateedit', function(e) { this.editors = Ext.create('Ext.util.MixedCollection', false, function(editor) { return editor.editorId; }); + this.editTask = Ext.create('Ext.util.DelayedTask'); + }, + + onReconfigure: function(){ + this.editors.clear(); + this.callParent(); }, /** @@ -170,6 +176,7 @@ grid.on('validateedit', function(e) { */ destroy: function() { var me = this; + me.editTask.cancel(); me.editors.each(Ext.destroy, Ext); me.editors.clear(); me.callParent(arguments); @@ -238,13 +245,13 @@ grid.on('validateedit', function(e) { me.setActiveColumn(columnHeader); // Defer, so we have some time between view scroll to sync up the editor - Ext.defer(ed.startEdit, 15, ed, [me.getCell(record, columnHeader), value]); + me.editTask.delay(15, ed.startEdit, ed, [me.getCell(record, columnHeader), value]); } else { // BrowserBug: WebKit & IE refuse to focus the element, rather // it will focus it and then immediately focus the body. This // temporary hack works for Webkit and IE6. IE7 and 8 are still // broken - me.grid.getView().el.focus((Ext.isWebKit || Ext.isIE) ? 10 : false); + me.grid.getView().getEl(columnHeader).focus((Ext.isWebKit || Ext.isIE) ? 10 : false); } }, @@ -283,7 +290,7 @@ grid.on('validateedit', function(e) { getEditor: function(record, column) { var me = this, editors = me.editors, - editorId = column.itemId || column.id, + editorId = column.getItemId(), editor = editors.getByKey(editorId); if (editor) { @@ -360,7 +367,7 @@ grid.on('validateedit', function(e) { me.context.record.set(dataIndex, value); // Restore focus back to the view's element. } else { - grid.getView().el.focus(); + grid.getView().getEl(activeColumn).focus(); } me.context.value = value; me.fireEvent('edit', me, me.context); @@ -375,7 +382,7 @@ grid.on('validateedit', function(e) { cancelEdit: function() { var me = this, activeEd = me.getActiveEditor(), - viewEl = me.grid.getView().el; + viewEl = me.grid.getView().getEl(me.getActiveColumn()); me.setActiveEditor(null); me.setActiveColumn(null);