mirror of
https://github.com/jquery/jquery.git
synced 2026-02-01 09:44:56 -05:00
Offset: remove ownerDocument check in offset getter
Fixes gh-2115
This commit is contained in:
@@ -42,20 +42,11 @@ module("offset", { setup: function(){
|
||||
*/
|
||||
|
||||
test("empty set", function() {
|
||||
expect(2);
|
||||
expect( 2 );
|
||||
strictEqual( jQuery().offset(), undefined, "offset() returns undefined for empty set (#11962)" );
|
||||
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 element", function() {
|
||||
expect(1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user