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 900514a commit 8fd6101Copy full SHA for 8fd6101
ui/jquery.ui.widget.js
@@ -195,7 +195,11 @@ $.Widget.prototype = {
195
if ( element !== this ) {
196
$.data( element, this.widgetName, this );
197
this._bind({ remove: "destroy" });
198
- this.document = $( element.ownerDocument );
+ this.document = $( element.style ?
199
+ // element within the document
200
+ element.ownerDocument :
201
+ // element is window or document
202
+ element.document || element );
203
this.window = $( this.document[0].defaultView || this.document[0].parentWindow );
204
}
205
0 commit comments