Unify the means of detecting a window across the library. Fixes jQuery UI bug #5438 and jQuery bugs #6575 and 6088.
This commit is contained in:
parent
ab454d9526
commit
c8dd49f756
4 changed files with 11 additions and 6 deletions
|
@ -33,7 +33,7 @@ jQuery.each([ "Height", "Width" ], function( i, name ) {
|
|||
});
|
||||
}
|
||||
|
||||
return ("scrollTo" in elem && elem.document) ? // does it walk and quack like a window?
|
||||
return jQuery.isWindow( elem ) ?
|
||||
// Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode
|
||||
elem.document.compatMode === "CSS1Compat" && elem.document.documentElement[ "client" + name ] ||
|
||||
elem.document.body[ "client" + name ] :
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue