A javascript error can occur when a behavior such as tableheader.js tries to perform it's behavior on HTML that is no longer on the page. An example was found when applying the new AHAH patch (http://drupal.org/node/157752), though this problem could occur with any kind of custom AHAH or AJAX manipulation on the page.

When the tableheader behavior (the table header scrolls with the page such as the modules or blocks pages) is first attached to the page, it creates a record of all table header cells on the page. If these table headers are removed from the page and the window is resized, a javascript error is thrown as jQuery tries to find the parent DOM elements for these header cells that have been removed from the page (and hence have no parents).

This is a small patch that looks for existing table headers on the page, rather than using the saved array of table headers, which might no longer be on the page.

CommentFileSizeAuthor
drupal_tableheader_dynamic.patch618 bytesquicksketch
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Dries’s picture

Status: Needs review » Reviewed & tested by the community

This makes sense to me. I've tested it and it all works. Thanks. :)

Gábor Hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

Dries actually committed the patch.

Anonymous’s picture

Status: Fixed » Closed (fixed)