We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 63f19a9 commit 25e8620Copy full SHA for 25e8620
src/offset.js
@@ -95,10 +95,17 @@ jQuery.fn.extend({
95
return;
96
}
97
98
+ // Support: IE<=11+
99
+ // Running getBoundingClientRect on a
100
+ // disconnected node in IE throws an error
101
+ if ( !elem.getClientRects().length ) {
102
+ return { top: 0, left: 0 };
103
+ }
104
+
105
rect = elem.getBoundingClientRect();
106
- // Make sure element is not hidden (display: none) or disconnected
- if ( rect.width || rect.height || elem.getClientRects().length ) {
107
+ // Make sure element is not hidden (display: none)
108
+ if ( rect.width || rect.height ) {
109
doc = elem.ownerDocument;
110
win = getWindow( doc );
111
docElem = doc.documentElement;
0 commit comments