Permalink
Browse files

Offset: Resolve strict mode ClientRect "no setter" exception

  • Loading branch information...
1 parent 7608437 commit 3befe5911af0cf516896482bb9ddf197c8cb8a8e @gibson042 gibson042 committed Apr 23, 2016
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/offset.js
View
@@ -144,8 +144,10 @@ jQuery.fn.extend( {
}
// Add offsetParent borders
- parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true );
- parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true );
+ parentOffset = {
+ top: parentOffset.top + jQuery.css( offsetParent[ 0 ], "borderTopWidth", true ),
+ left: parentOffset.left + jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true )
+ };
}
// Subtract parent offsets and element margins

0 comments on commit 3befe59

Please sign in to comment.