IE11 won't scroll table went using responsive height

Tags: #<Tag:0x00007f8b1cdeb3f0>

Hello,

I have an issue where a table with a percentage based height won’t scroll in IE11 only, whereas Chrome etc. all work perfectly.

I have tracked the issue down to this function in helpers/dom/element.js …

export function getComputedStyle(element) {
return element.currentStyle || document.defaultView.getComputedStyle(element);
}

I think that the check should be the other way around? As the latter check (getComputedStyle) converts to a pixel based height, where as the former (element.currentStyle) doesn’t and leaves the height responsive. This seems to break the scrolling.

Please can you advise what to do about this issue and whether it can be fixed?

Thanks,
David.

Hi David,

Handsontable uses pixels to scale everything. From the height of a single cell to the whole container. I do not recommend using percentage values and you may end up with a misaligned rows and half-rendered table.

Hmm, I thought that the idea was that it would fill the parent container?

The frustrating thing is that it would work if just those checks were the other way around as IE11 has support for getComputedStyle.

You can use stretchH settings to fill the container horizontally (width)

Yeah, thanks, I’ve done that for the horizontal, but I can’t have a percentage based height on the table?

Sorry, no percentage values at all. However you can use native JS methods to get actual height in pixels and return a pixel value that is a part of the viewport height.

I wanted to update the subject. In the latest version 7.0.0 we have added an ability to use % values
Here’s a corresponding subject https://github.com/handsontable/handsontable/issues/5749