Bug Tracker

Changeset 5715

Show
Ignore:
Timestamp:
06/06/08 00:28:33 (7 months ago)
Author:
scott.gonzalez
Message:

core: fixed #2993: .offsetParent() will now return the body element in all browsers for fixed position elements.

Files:
1 modified

Legend:

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

    r5693 r5715  
    133133 
    134134    offsetParent: function() { 
    135         var offsetParent = this[0].offsetParent; 
     135        var offsetParent = this[0].offsetParent || document.body; 
    136136        while ( offsetParent && (!/^body|html$/i.test(offsetParent.tagName) && jQuery.css(offsetParent, 'position') == 'static') ) 
    137137            offsetParent = offsetParent.offsetParent;