mirror of
https://github.com/jquery/jquery.git
synced 2026-04-20 03:01:22 -04:00
Fix #8482, offsetParent should not return null. Closes gh-847.
This commit is contained in:
committed by
Dave Methvin
parent
05aff40231
commit
aaf134bb70
@@ -440,7 +440,7 @@ test("chaining", function() {
|
||||
});
|
||||
|
||||
test("offsetParent", function(){
|
||||
expect(11);
|
||||
expect(12);
|
||||
|
||||
var body = jQuery("body").offsetParent();
|
||||
equal( body.length, 1, "Only one offsetParent found." );
|
||||
@@ -464,6 +464,9 @@ test("offsetParent", function(){
|
||||
equal( div.length, 2, "Two offsetParent found." );
|
||||
equal( div[0], document.body, "The body is the offsetParent." );
|
||||
equal( div[1], jQuery("#nothiddendiv")[0], "The div is the offsetParent." );
|
||||
|
||||
var area = jQuery("#imgmap area").offsetParent();
|
||||
equal( area[0], document.body, "The body is the offsetParent." );
|
||||
});
|
||||
|
||||
test("fractions (see #7730 and #7885)", function() {
|
||||
|
||||
Reference in New Issue
Block a user