Changeset 12742

Show
Ignore:
Timestamp:
02/27/08 08:45:07 (9 months ago)
Author:
jaredj
Message:

Update to fix double-click cell editor close and open problem. Fix provided by Ben Shell. fixes #5842 \!strict

Location:
dojox/trunk/grid
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • dojox/trunk/grid/VirtualGrid.js

    r12420 r12742  
    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 
     
    138141                this.styleChanged = this._styleChanged; 
    139142                this.setStructure(this.structure); 
     143                this._click = []; 
    140144        }, 
    141145         
  • dojox/trunk/grid/_grid/publicEvents.js

    r12524 r12742  
    175175                // e: Event 
    176176                //              Decorated event object which contains reference to grid, cell, and rowIndex 
     177                this._click[0] = this._click[1]; 
     178                this._click[1] = e; 
    177179                if(!this.edit.isEditCell(e.rowIndex, e.cellIndex)){ 
    178180                        this.focus.setFocusCell(e.cell, e.rowIndex); 
     
    186188                // e: Event 
    187189                //              Decorated event object contains reference to grid, cell, and rowIndex 
    188                 this.edit.setEditCell(e.cell, e.rowIndex);  
     190                if(dojo.isIE){ 
     191                        this.edit.setEditCell(this._click[1].cell, this._click[1].rowIndex); 
     192                }else if(this._click[0].rowIndex != this._click[1].rowIndex){ 
     193                        this.edit.setEditCell(this._click[0].cell, this._click[0].rowIndex); 
     194                }else{ 
     195                        this.edit.setEditCell(e.cell, e.rowIndex); 
     196                } 
    189197                this.onRowDblClick(e); 
    190198        },