]> source.dussan.org Git - jquery.git/commitdiff
Offset: Resolve strict mode ClientRect "no setter" exception
authorRichard Gibson <richard.gibson@gmail.com>
Sat, 23 Apr 2016 04:31:28 +0000 (00:31 -0400)
committerRichard Gibson <richard.gibson@gmail.com>
Sat, 23 Apr 2016 04:31:28 +0000 (00:31 -0400)
src/offset.js

index 907dc0989e6bd1de2ae08421812e704c1aa5eb64..18e6eebed30dbef822de0b6859378f7c7661df19 100644 (file)
@@ -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