diff options
author | Oleg Gaidarenko <markelog@gmail.com> | 2014-11-11 16:27:44 +0300 |
---|---|---|
committer | Oleg Gaidarenko <markelog@gmail.com> | 2014-11-16 18:05:29 +0300 |
commit | f7e60dc83d81cbf892de9dab39642dd67c49bd23 (patch) | |
tree | 2f02f38ce4a91db06c8535019ec8e2ab3219735b /test/unit/dimensions.js | |
parent | 9d6beac3958da79671344fd11b9a3fe9b85f88e1 (diff) | |
download | jquery-f7e60dc83d81cbf892de9dab39642dd67c49bd23.tar.gz jquery-f7e60dc83d81cbf892de9dab39642dd67c49bd23.zip |
Dimensions: allow modification of coordinates argument
Fixes gh-1848
Closes gh-1853
Diffstat (limited to 'test/unit/dimensions.js')
-rw-r--r-- | test/unit/dimensions.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/unit/dimensions.js b/test/unit/dimensions.js index 8d51c6cde..7d37e13bc 100644 --- a/test/unit/dimensions.js +++ b/test/unit/dimensions.js @@ -455,4 +455,16 @@ testIframe( "dimensions/documentLarge", "window vs. large document", function( j ok( jQuery( document ).width() > jQuery( window ).width(), "document width is larger than window width" ); }); +test( "allow modification of coordinates argument (gh-1848)", 1, function() { + var element = jQuery( "<div/>" ).appendTo( "#qunit-fixture" ); + + element.offset(function( index, coords ) { + coords.top = 100; + + return coords; + }); + + equal( element.offset().top, 100, "coordinates are modified" ); +}); + })(); |