mirror of
https://github.com/jquery/jquery.git
synced 2026-02-14 03:55:03 -05:00
Fix #12534. Don't die on browsers lacking getBoundingClientRect.
This commit is contained in:
@@ -15,6 +15,15 @@ test("empty set", function() {
|
||||
strictEqual( jQuery().position(), undefined, "position() returns undefined for empty set (#11962)" );
|
||||
});
|
||||
|
||||
test("object without getBoundingClientRect", function() {
|
||||
expect(2);
|
||||
|
||||
// Simulates a browser without gBCR on elements, we just want to return 0,0
|
||||
var result = jQuery({ ownerDocument: document }).offset();
|
||||
equal( result.top, 0, "Check top" );
|
||||
equal( result.left, 0, "Check left" );
|
||||
});
|
||||
|
||||
test("disconnected node", function() {
|
||||
expect(2);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user