I have a module that does an ajaxForm call to get a new version of the block's page, and then does a .html() call to replace the current blocks table with the new one. Then, of course, I do a Drupal.attachBehaviors on the new table. That is all fine and the javascript table headers show up as expected on the new table. But, as soon as I scroll, I get the following error in Firebug:

parent has no properties
while ( parent.tagName && !/^body|html$/i.test(parent.tagName) ) {
in jQuery 2958

(I got the actual jQuery line and line number by swapping in an uncompressed version of jQuery 1.2.1. It is in the offset function).

I commented out the contents of the tableheader.js file, and the error went away, but I have not been able to track it down more than that.
I have not noticed any actually problems or reduced functionality as a result of this error.

CommentFileSizeAuthor
#2 nopersist-select-onresize.patch613 bytesdvessel

Comments

dvessel’s picture

This was originally encountered here: http://drupal.org/node/179937

That was when the blocks table was implemented with disabled regions not showing up on the table. When I was fixing various other issues with tableheader.js, I reverted that by accident thinking I was using a more efficient selector.

Could you do a quick test by swapping out this line at the bottom of tableheader.js?

    time = setTimeout(function () {
      $('table.sticky-header').each(function () { // <- change this line.
        // Force cell width calculation.
        this.viewHeight = 0;
        tracker(this);
      });
      // Reset timer
      time = null;
    }, 250);
dvessel’s picture

Status: Active » Needs review
StatusFileSize
new613 bytes

Here's a patch instead.

Performance isn't a problem since it's on resize which is seldom done. Should have seen this earlier. Sorry.

starbow’s picture

Cool. The patch fixed the error message, and the table headers still seem to work fine.

Thanks!

starbow’s picture

Priority: Normal » Critical

Since this is a regression, I am going to bump it up to critical.

dvessel’s picture

Priority: Critical » Normal
Status: Needs review » Reviewed & tested by the community

I don't think it's critical. But you demonstrated that it fixed the problem. Marking RTBC.

gábor hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

Committed, thanks.

starbow’s picture

Status: Fixed » Postponed (maintainer needs more info)

Drat, the parent has no properties error has started showing up again. I will attempt to create a good test case to share.

starbow’s picture

Status: Postponed (maintainer needs more info) » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.