Results 1 to 3 of 3

Thread: cellclick event doesn't alway fire on first click

  1. #1
    Sencha User
    Join Date
    Dec 2007
    Posts
    84

    Question cellclick event doesn't alway fire on first click

    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.

  2. #2
    Sencha User jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    DC Area =)
    Posts
    16,364

    Default

    i have not seen this. Any way you can post something so we can reproduce this?

  3. #3
    Sencha User
    Join Date
    Aug 2012
    Posts
    1

    Default

    Open examples/grid/edit-grid.js from ExtJS 3 and modify the code to log all "cellclick" events on the grid:
    Code:
        // 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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •