From 3befe5911af0cf516896482bb9ddf197c8cb8a8e Mon Sep 17 00:00:00 2001 From: Richard Gibson Date: Sat, 23 Apr 2016 00:31:28 -0400 Subject: [PATCH] Offset: Resolve strict mode ClientRect "no setter" exception --- src/offset.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/offset.js b/src/offset.js index 907dc0989..18e6eebed 100644 --- a/src/offset.js +++ b/src/offset.js @@ -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 -- 2.39.5