Click event doesn't fire with fixedColumnsLeft and custom renderer

Tags: #<Tag:0x00007efc6fd5c4c0>

I’ve run into an issue where click events in a cell are not firing under a confluence of conditions:

  1. A custom renderer that renders some <div> elements in the cell
  2. fixedColumnsLeft is set to 1
  3. The first column is resized to take up most of the table width
  4. Use Chrome (doesn’t happen in FireFox)

Result: Click events in the column are lost

See this JSfiddle:
https://jsfiddle.net/a438ovr1/2/

In this demo a click handler is added to the HoT table element, it has fixedColumnsLeft: 1 and a custom renderer for the first column that renders <div>${ value }</div>.

  1. Click in the “name” column cells and notice that you get console log “Table click”
    image image
  2. Resize the “name” column to be wide enough to truncate the “description” column
  3. Click in the “name” column cells and notice that the console log no longer reports the click
  • If you remove fixedColumnsLeft: 1 then at (3) above the click events are still captured
  • If you change the renderer for the name column to set textContent instead of innerHTML, then at (3) above the click events are still captured
  • Only happens in Chrome, if you use FireFox then at (3) above the click events are still captured

It seems that under the conditions described above the click handler coming from a table cell is lost. I can’t track down why this is. Any help would be appreciated!

Thank you for sharing the issue report, Aaron.

That’s an interesting finding. We do not have any similar reports on the GitHub board.

I’ve checked that out with a different version and found our that the last working version is 12.0.1 and it seems to be broken from 12.1.0. There were some changes related to counting indexes to which might be the cause of the issue.

I will report that internally and let you now as soon as we fix it.

Some more feedback on the issue.

  1. Clicking a cell with an open editor will bring the log.

  2. Visibility of the second column

I’ve posted all of that in our internal report. Hopefully that will speed up the fix.

Hey @abeall

we already have a fix within PR merged at https://github.com/handsontable/handsontable/pull/10912.

Oh, awesome, thanks for the update!

I feel like spamming you @abeall but it is only to share the good news :slight_smile: this issue is merged and released in v14.4.0