Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setActiveCellInternal and scrollRowIntoView are not called when they should be #63

Open
HobbsB opened this issue Nov 26, 2013 · 0 comments

Comments

@HobbsB
Copy link

HobbsB commented Nov 26, 2013

Please forgive me if I am just missing something.

in slick.grid.js: function handleClick(e)

the functions:
scrollRowIntoView(cell.row, false);
setActiveCellInternal(getCellNode(cell.row, cell.cell));

are not called unless there are frozen rows. This does not appear correct to me, because auto-edit will then require a double click to edit cells.
Should there be an else condition for this, to operate as it does in the original?

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));
                }
            }
        }

modified to something like:

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));
                }
               else {
                   scrollRowIntoView(cell.row, false);
                    setActiveCellInternal(getCellNode(cell.row, cell.cell));
              }
            }
        }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant