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 /src/offset.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 '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 aee95efde..69e571f7f 100644 --- a/src/offset.js +++ b/src/offset.js @@ -51,7 +51,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 ) { |