Skip to content

Commit d047073

Browse files
Queeniebeedmethvin
authored andcommitted
Offset: allow small differences in offset.top
Fixes gh-2590 (cherry picked from commit 9f9e204)
1 parent d3a2fdc commit d047073

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/unit/offset.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,9 @@ QUnit.test( "fractions (see #7730 and #7885)", function( assert ) {
566566

567567
result = div.offset();
568568

569-
assert.equal( result.top, expected.top, "Check top" );
569+
// Support: Chrome 45-46+
570+
// In recent Chrome these values differ a little.
571+
assert.ok( Math.abs( result.top - expected.top ) < 0.25, "Check top within 0.25 of expected" );
570572
assert.equal( result.left, expected.left, "Check left" );
571573

572574
div.remove();

0 commit comments

Comments
 (0)