PDA

View Full Version : [FIXED] ExtJs 4.2: beforeedit event is fired twice when clicking on an editable cell



aedos
4 Apr 2013, 9:10 PM
Ext version tested:

Ext 4.2.0.663
Browser versions tested against:

FF and Chrome
Description:

beforeedit event is fired twice when clicking on an editable cell.
Steps to reproduce the problem:

Run the test case and observe the console log when clicking into a cell editor
The result that was expected:

Only one startedit event is expected when edit each cell
Test Case:


Ext.onReady(function() {
Ext.create('Ext.data.Store', {
storeId:'simpsonsStore',
fields:['name', 'email', 'phone'],
data:{'items':[
{"name":"Lisa", "email":"lisa@simpsons.com", "phone":"555-111-1224"},
{"name":"Bart", "email":"bart@simpsons.com", "phone":"555-222-1234"},
{"name":"Homer", "email":"home@simpsons.com", "phone":"555-222-1244"},
{"name":"Marge", "email":"marge@simpsons.com", "phone":"555-222-1254"}
]},
proxy: {
type: 'memory',
reader: {
type: 'json',
root: 'items'
}
}
});


Ext.create('Ext.grid.Panel', {
title: 'Simpsons',
store: Ext.data.StoreManager.lookup('simpsonsStore'),
columns: [
{header: 'Name', dataIndex: 'name', editor: 'textfield'},
{header: 'Email', dataIndex: 'email', flex:1,
editor: {
xtype: 'textfield',
allowBlank: false
}
},
{header: 'Phone', dataIndex: 'phone'}
],
selType: 'cellmodel',
plugins: [
Ext.create('Ext.grid.plugin.CellEditing', {
clicksToEdit: 1,
listeners : {beforeedit: function(editor, e) {
console.log('beforeedit: ' + e.field)
}}
})
],
height: 200,
width: 400,
renderTo: Ext.getBody()
});
});

slemmon
4 Apr 2013, 9:18 PM
Thanks for the report! I have opened a bug in our bug tracker.
Really appreciate you taking the time to report issues you find!

renganathan
29 Apr 2014, 4:43 AM
Hi,

Can you provide the patch for Extjs 4.2.1 version.