Dimensions: allow modification of coordinates argument

Ref f7e60dc83d
This commit is contained in:
Oleg Gaidarenko
2014-11-11 16:27:44 +03:00
parent 38ac3c43ff
commit 1eedf0e9ea
2 changed files with 15 additions and 1 deletions

View File

@@ -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 ) {