Include scroll offsets for everything but inline and table-row elements

This commit is contained in:
Brandon Aaron 2007-09-11 01:08:51 +00:00
parent 2608bae438
commit ed51be1622

View file

@ -57,7 +57,7 @@ jQuery.fn.offset = function() {
// Get parent scroll offsets
while ( parent.tagName && !/^body|html$/i.test(parent.tagName) ) {
// Work around opera inline/table scrollLeft/Top bug
if ( /^inline|table-row.*$/i.test(jQuery.css(parent, "display")) )
if ( !/^inline|table-row.*$/i.test(jQuery.css(parent, "display")) )
// Subtract parent scroll offsets
add( -parent.scrollLeft, -parent.scrollTop );