Skip to content

getCellFromEvent() not returning correct row when editing checkboxes with keyboard #62

Open
@HobbsB

Description

@HobbsB

Hi - my first issue created on GitHub. Please let me know if the issue is unclear or the write-up is not optimal.

Using 2.0-frozenRowsAndColumns.

When a checkbox cell is selected and editable, clicking spacebar triggers a click and marks the checkbox as selected.

This triggers the slick.grid.js function:
handleClick(e)

Which calls
getCellFromEvent(e)

In the standard Slickgrid, the value of the selected cell is returned from getCellFromEvent().

In this fork, the row that is returned is based on which row the idle mouse is located on the grid.

If a user is using the keyboard, this means that the next line:
if (!cell || (currentEditor !== null && activeRow == cell.row && activeCell == cell.cell)) {
return;
}

will not execute the "return;", and will continue execution for an invalid click event.

This causes the onClick events to trigger for a cell which is not being edited or clicked.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions