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:06:39 +0300 |
commit | 1eedf0e9ea4dc2d12edf28e77b33ae23de01af3b (patch) | |
tree | b546cd765ce21557f6440c79401661fd8f7431ad /src/offset.js | |
parent | 38ac3c43ffdd79e6d8fd6ef5d652228fbc5ac33f (diff) | |
download | jquery-1eedf0e9ea4dc2d12edf28e77b33ae23de01af3b.tar.gz jquery-1eedf0e9ea4dc2d12edf28e77b33ae23de01af3b.zip |
Dimensions: allow modification of coordinates argument
Ref f7e60dc83d81cbf892de9dab39642dd67c49bd23
Diffstat (limited to 'src/offset.js')
-rw-r--r-- | src/offset.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/offset.js b/src/offset.js index 0200dd64e..eb3c1f119 100644 --- a/src/offset.js +++ b/src/offset.js @@ -57,7 +57,9 @@ jQuery.offset = { } if ( jQuery.isFunction( options ) ) { - options = options.call( elem, i, curOffset ); + + // Use jQuery.extend here to allow modification of coordinates argument (gh-1848) + options = options.call( elem, i, jQuery.extend( {}, curOffset ) ); } if ( options.top != null ) { |