[GH #3108] Cannot read property of null

Tags: #<Tag:0x00007efc651a0780> #<Tag:0x00007efc651a0640>

Hi,

We are running into an issue with handsOnTable, where we keep getting a “TypeError: Cannot read property ‘parentNode’ of null” or “TypeError: Cannot read property ‘tagName’ of null” error.

The first seems to be occurring int he GetCoords function, while the second seems to be in the checkIfColumnHeader function. However it looks like the cause of the issue is the same in both cases, where the function gets the parent of the item in question, and a null is returned which causes the error above when attempting to read its parent or its tagName.

I have managed to replicate the issue, when it occurs in GetCoords here:
https://jsfiddle.net/fhLkj581/2/

(I have not managed to replicate the tagName issue outside of our environment…and even there we are not sure of the exact steps required to replicate since it occurs when one clicks on a cell and highlights randomly around the cell)

We have tried this on both the 6.2.0 as well as the 7.2.1 and it seems to occur on both. We also tried this on Chrome, Firefox and Edge, and it was encountered on all browsers.

Does anyone know if we are doing something wrong that from our end that is resulting in this issue?
Alternatively does anyone know a way we can bypass this issue?
Thanks

Hi @odbuh

the issue is gone if you remove overflow: 'hidden' from the element CSS.
Here are some connected topics https://github.com/handsontable/handsontable/issues?utf8=✓&q=is%3Aissue+is%3Aopen+overflow
Handsontable does not understand overflow: 'hidden' and in most of the cases does not renderer well or at all.

Hi Aleksandra,

Thanks for your reply.
I adjusted the example above (https://jsfiddle.net/k6w2f3dg/1/)
by removing the overflow and adding preventOverflow (the grid needs to be scrollable).
However it looks like the issue is still occurring.
Am I missing something?

I think that it might be related to https://github.com/handsontable/handsontable/issues/3108
When you remove the preventOverflow it works well.

It looks like those issues are related and fixing one of them might fixe them all.

It looks like that may be the case.
Hopefully this can be fixed soon.

Thanks a lot for your help.