IE8 responsive issues

IE8 responsive issues

park896park896 Posts: 6Questions: 2Answers: 0

There are a couple of issues with the responsive plugin that I would like to propose fixes for.
1. The click handler for expanding/collapsing the child row is called twice in IE8. This is due to event an propagation issue in IE. You need to call e.stopPropagation(); in the handler in order to prevent this behavior.
2. IE8 and possibly 9 have several issues regarding .cloneNode(). I am sure you are using this function for performance reasons and because the jQuery implementation of .clone() doesn't support cloning without children. However, because of this issue calling the responsive api function responsive.recalc() causes the click handler for expanding/collapsing child rows to be removed. I was able to fix this by using jQuery .clone().empty(). I understand that is less than ideal but it was the easiest way forward.

var clonedTable = $(dt.table().node()).clone( false ).empty()[0]; var clonedHeader = $( dt.table().header()).clone( false ).empty().appendTo( clonedTable ); var clonedBody = $( dt.table().body()).clone( false ).empty().appendTo( clonedTable ); var clone = $(dt.row( idx ).node()).clone( false )[0];

This discussion has been closed.