diff options
author | jeresig <jeresig@gmail.com> | 2010-09-22 16:41:51 -0400 |
---|---|---|
committer | jeresig <jeresig@gmail.com> | 2010-09-22 16:41:51 -0400 |
commit | c8dd49f756562fef68f664869952e4f5aab08acd (patch) | |
tree | 171989c57a01f0c84c7d0486645ac434a8d92472 /src/offset.js | |
parent | ab454d9526445fa025b9c897ec2b21aa89babc8d (diff) | |
download | jquery-c8dd49f756562fef68f664869952e4f5aab08acd.tar.gz jquery-c8dd49f756562fef68f664869952e4f5aab08acd.zip |
Unify the means of detecting a window across the library. Fixes jQuery UI bug #5438 and jQuery bugs #6575 and 6088.
Diffstat (limited to 'src/offset.js')
-rw-r--r-- | src/offset.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/offset.js b/src/offset.js index a3776c201..650cc08e9 100644 --- a/src/offset.js +++ b/src/offset.js @@ -280,7 +280,7 @@ jQuery.each( ["Left", "Top"], function( i, name ) { }); function getWindow( elem ) { - return ("scrollTo" in elem && elem.document) ? + return jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 ? elem.defaultView || elem.parentWindow : |