Skip to content

Fix click propagation for non-editable cells with editors#4891

Open
rathboma wants to merge 2 commits into
masterfrom
claude/clever-wozniak-LVkGj
Open

Fix click propagation for non-editable cells with editors#4891
rathboma wants to merge 2 commits into
masterfrom
claude/clever-wozniak-LVkGj

Conversation

@rathboma
Copy link
Copy Markdown
Collaborator

@rathboma rathboma commented Jun 4, 2026

Summary

Fixed an issue where click events on non-editable cells were being stopped from propagating, preventing the cellClick callback from firing when a column had an editor defined but the cell itself was not editable.

Changes

  • Edit.js: Moved the e.stopPropagation() call to only execute after confirming the cell is actually editable. Previously, the propagation was stopped before checking editability, which swallowed clicks on non-editable cells and prevented them from reaching parent listeners.

Implementation Details

The fix ensures that:

  • Click events on non-editable cells now properly bubble up to parent listeners, allowing the table-level cellClick callback to fire
  • Click events on editable cells still have propagation stopped as intended
  • The change is minimal and surgical, only reordering when stopPropagation() is called relative to the allowEdit() check

This resolves issue #4421 where the cellClick event was not firing for cells in columns with editors defined but marked as non-editable.

https://claude.ai/code/session_01Nt4ggeWkoLbhrLcYwciwts

claude added 2 commits June 4, 2026 21:36
#4421)

Add a failing unit test demonstrating that when a column defines an editor
but the cell is not editable, the edit click handler calls e.stopPropagation()
before checking editability. This swallows the click so it never reaches the
table-level listener that powers the cellClick callback.
The edit click handler called e.stopPropagation() unconditionally whenever a
column had an editor defined, before checking whether the cell was actually
editable. When the cell was not editable the click was swallowed and never
reached the table-level listener that powers the cellClick callback, so it
never fired (regression since 5.6).

Move the stopPropagation() call inside the editability check so it only runs
when the cell will actually be edited, allowing clicks on non-editable cells
to propagate normally.
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

Successfully merging this pull request may close these issues.

2 participants