Ticket #5842: 5842.patch

File 5842.patch, 1.7 kB (added by benschell, 11 months ago)
  • dojox/grid/_grid/publicEvents.js

     
    150150                //              Event fired when a cell is clicked. 
    151151                // e: Event 
    152152                //              Decorated event object which contains reference to grid, cell, and rowIndex 
     153                this._click[0] = this._click[1]; 
     154                this._click[1] = e; 
    153155                if(!this.edit.isEditCell(e.rowIndex, e.cellIndex)){ 
    154156                        this.focus.setFocusCell(e.cell, e.rowIndex); 
    155157                } 
     
    161163                //              Event fired when a cell is double-clicked. 
    162164                // e: Event 
    163165                //              Decorated event object contains reference to grid, cell, and rowIndex 
    164                 this.edit.setEditCell(e.cell, e.rowIndex);  
     166                if(dojo.isIE){ 
     167                        this.edit.setEditCell(this._click[1].cell, this._click[1].rowIndex); 
     168                }else if(this._click[0].rowIndex != this._click[1].rowIndex){ 
     169                        this.edit.setEditCell(this._click[0].cell, this._click[0].rowIndex); 
     170                }else{ 
     171                        this.edit.setEditCell(e.cell, e.rowIndex); 
     172                } 
    165173                this.onRowDblClick(e); 
    166174        }, 
    167175 
  • dojox/grid/VirtualGrid.js

     
    109109        // singleClickEdit: boolean 
    110110        //              Single-click starts editing. Default is double-click 
    111111        singleClickEdit: false, 
     112 
     113        // Used to store the last two clicks, to ensure double-clicking occurs based on the intended row 
     114        _click: null, 
    112115         
    113116        // private 
    114117        sortInfo: 0, 
     
    137140                // replace stock styleChanged with one that triggers an update 
    138141                this.styleChanged = this._styleChanged; 
    139142                this.setStructure(this.structure); 
     143                this._click = []; 
    140144        }, 
    141145         
    142146        destroy: function(){