Include scroll offsets for everything but inline and table-row elements
This commit is contained in:
parent
2608bae438
commit
ed51be1622
|
@ -57,7 +57,7 @@ jQuery.fn.offset = function() {
|
||||||
// Get parent scroll offsets
|
// Get parent scroll offsets
|
||||||
while ( parent.tagName && !/^body|html$/i.test(parent.tagName) ) {
|
while ( parent.tagName && !/^body|html$/i.test(parent.tagName) ) {
|
||||||
// Work around opera inline/table scrollLeft/Top bug
|
// 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
|
// Subtract parent scroll offsets
|
||||||
add( -parent.scrollLeft, -parent.scrollTop );
|
add( -parent.scrollLeft, -parent.scrollTop );
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue