JLynch7 / SlickGrid

A lightning fast JavaScript grid/spreadsheet
https://github.com/jlynch7/SlickGrid/wiki
MIT License
89 stars 76 forks source link

autoEdit : true doesn't work in SlickGrid-2.0-frozenRowsAndColumns #82

Open khanhdang11091981 opened 9 years ago

khanhdang11091981 commented 9 years ago

Hello,

I tried to run the "example3-editing" and set the "autoEdit : true" by clicking on the button "AUTO-edit ON", but it doesn't work (still need to double click for editing the field). Below is the link of "example3-editing". Can you please check and advise what is wrong with it?

http://jlynch7.github.io/SlickGrid/examples/example3-editing.html

Thanks,

helloqhx commented 8 years ago

I have checked the relevant code, and find the following:

if ((activeCell != cell.cell || activeRow != cell.row) && canCellBeActive(cell.row, cell.cell)) {
    if (!getEditorLock().isActive() || getEditorLock().commitCurrentEdit()) {
        if (hasFrozenRows) {
            if (( !( options.frozenBottom ) && ( cell.row >= actualFrozenRow ) )
                            || ( options.frozenBottom && ( cell.row < actualFrozenRow ) )
            ) {
                scrollRowIntoView(cell.row, false);
            }

            setActiveCellInternal(getCellNode(cell.row, cell.cell));
       }
   }
}

So the hasFronzenRows if statement has blocked editing the active cell.