Bug Tracker

Changeset 4241

Show
Ignore:
Timestamp:
12/19/07 19:07:12 (1 year ago)
Author:
brandon.aaron
Message:

offset: make sure there is a parent node to work on while calculating scroll offsets (#2073)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/jquery/src/offset.js

    r4240 r4241  
    5656         
    5757            // Get parent scroll offsets 
    58             while ( parent.tagName && !/^body|html$/i.test(parent.tagName) ) { 
     58            while ( parent && parent.tagName && !/^body|html$/i.test(parent.tagName) ) { 
    5959                // Remove parent scroll UNLESS that parent is inline or a table to work around Opera inline/table scrollLeft/Top bug 
    6060                if ( !/^inline|table.*$/i.test(jQuery.css(parent, "display")) )