IE8 and scrollX / scrollY

IE8 and scrollX / scrollY

rolintoucourrolintoucour Posts: 2Questions: 1Answers: 0

Hi,

Using js DataTable, there is an error thrown only in IE8 when I use any of options scrollX / scrollY and it seems to be related to drawing: it is thrown when the datatable is displayed, on resize, or when I hide/display the table.

I have the last version of the library. I instanciate DataTable from js objects like this:

$("#mytable").DataTable({
                            order: [],
                            "processing": true,
                            "orderClasses": false,
                            data: data,
                            scrollY: 400,
                            scrollX: true,
                            columns: columns,
                            deferRender: true,
                        });

The error is in datatable.js:

_fnApplyToChildren( function(nSizer, i) {
    nSizer.innerHTML = '<div class="dataTables_sizing" style="height:0;overflow:hidden;">'+headerContent[i]+'</div>';
    nSizer.style.width = headerWidths[i];
}, headerSrcEls );

on the line:

nSizer.innerHTML  =

When I disable scrollX and scrollY, it works but it is slower, and I really need it.

Answers

  • rolintoucourrolintoucour Posts: 2Questions: 1Answers: 0

    After further search:

    nSizer.innerHTML = '<div class="dataTables_sizing" style="height:0;overflow:hidden;">'+headerContent[i]+'</div>';
    

    throws an error in IE (tested with a single word instead of the DIV: same error).
    But:

    $(nSizer).html('<div class="dataTables_sizing" style="height:0;overflow:hidden;">'+headerContent[i]+'</div>');
    

    is OK

This discussion has been closed.