Using sticky-enabled Table Headers causes IE10 to crash on printing A customer complained that printing a Views page on my Drupal 7.23 (Marinelli 7.x-3.0-beta11) Site causes IE10 to error ("Internet Explorer has stopped working").  And he's right.  Works fine on Firefox, Chrome, Opera, even IE9 (but not IE 10 Browser Mode IE9).  It does work in IE10 in Document Mode 'quirks'.

On investigation it boils down to using sticky table headers - use them fail, turn them off fine!  I found that code in misc/tableheader.js lines 12-14 (below) 'helps' IE10 create the problem.

So, I have a crude workaround, but would prefer to do something more elegant. Anyone encountered this problem and have a workaround (short of not using IE10?).  

$('table.sticky-enabled', context).once('tableheader', function () {
  $(this).data("drupal-tableheader", new Drupal.tableHeader(this));
});


Update - I guess it is naïve of me to expect someone to identify the error either in Drupal core, the theme, Views or my code which causes this problem. Certainly not without providing more information.  I was hoping it might 'ring a bell' and thus satisfy my curiosity.

Can I ask for more specific advice?  I found elsewhere the code below to include in template.php as a more elegant way of disabling sticky headers than no-oping the function in drupal tableheaders.js.  Can anyone please suggest how I can restrict this to print requests only? Thanks Ron

function marinelli_js_alter(&amp;$js) {
  unset($js['misc/tableheader.js']);
}
In the last paragraph you talk about hook_js_alter.

Basically the first part should be a name of your template or custom module, so if your module will be named ie_workaround.module function should look like this:

function ie_workaround_js_alter(&amp;$js) {
  unset($js['misc/tableheader.js']);
}


It's important to do your best to have this hook executed when this element is already set by the module or theme that sets it. You can do this using hook_module_implements_alter and placing your hook at the end of hooks array.