aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/dimensions.js
diff options
context:
space:
mode:
authorOleg Gaidarenko <markelog@gmail.com>2014-11-11 16:27:44 +0300
committerOleg Gaidarenko <markelog@gmail.com>2014-11-16 18:06:39 +0300
commit1eedf0e9ea4dc2d12edf28e77b33ae23de01af3b (patch)
treeb546cd765ce21557f6440c79401661fd8f7431ad /test/unit/dimensions.js
parent38ac3c43ffdd79e6d8fd6ef5d652228fbc5ac33f (diff)
downloadjquery-1eedf0e9ea4dc2d12edf28e77b33ae23de01af3b.tar.gz
jquery-1eedf0e9ea4dc2d12edf28e77b33ae23de01af3b.zip
Dimensions: allow modification of coordinates argument
Ref f7e60dc83d81cbf892de9dab39642dd67c49bd23
Diffstat (limited to 'test/unit/dimensions.js')
-rw-r--r--test/unit/dimensions.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/unit/dimensions.js b/test/unit/dimensions.js
index 97e23d7e2..a5c650afa 100644
--- a/test/unit/dimensions.js
+++ b/test/unit/dimensions.js
@@ -470,4 +470,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" );
+});
+
})();