View Full Version : cellclick event doesn't alway fire on first click

6 Apr 2010, 7:04 AM
Hey guys -

I have a situation where I'm presenting an editable grid to the user. Each row contains an icon which the user can click to perform an action after editing the value in one of the cells in the row. I have added a listener to the cellclick event of the grid panel which allows me to identify the row and column and even the image that the user clicked on. This all works great. Here is the problem:

If the user clicks into an editable field, edits the value , then clicks directly on an icon, the cellclick event does not fire. It takes a second click to fire the cellclick event. Alternatively, if the user tabs out of the editable field first, thus completing the edit process, then clicks on the icon, the cellclick event fires the first time. This issue can easily be reproduced by adding a listener to the cellclick event of the EditorGridPanel used in the 'Editable Grid' example. I did this myself just to make sure it wasn't something quirky in my code that was causing the problem.

Any ideas on how to work around this would be greatly appreciated. I have a feeling that the users will not like the idea of having to tab out of an editable field before clicking the icon. Thanks for your help.

8 Apr 2010, 8:57 AM
i have not seen this. Any way you can post something so we can reproduce this?

24 Oct 2012, 3:06 AM
Open examples/grid/edit-grid.js from ExtJS 3 and modify the code to log all "cellclick" events on the grid:

// create the editor grid
var grid = new Ext.grid.EditorGridPanel({
listeners : {
'cellclick' : function(grid, rowIndex, columnIndex, e) {
console.log('cellclick '+rowIndex+':'+columnIndex);

Run the example, click "Add plant" button - new row is added and "New Plant 1" is focused, type something in this field. Click on any other cell - "cellclick" event is not fired.