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/event.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/event.js')
-rw-r--r-- | src/event.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/event.js b/src/event.js index 169760a8b..e63b9c074 100644 --- a/src/event.js +++ b/src/event.js @@ -25,7 +25,7 @@ jQuery.event = { // For whatever reason, IE has trouble passing the window object // around, causing it to be cloned in the process - if ( elem.setInterval && ( elem !== window && !elem.frameElement ) ) { + if ( jQuery.isWindow( elem ) && ( elem !== window && !elem.frameElement ) ) { elem = window; } @@ -515,7 +515,7 @@ jQuery.event = { beforeunload: { setup: function( data, namespaces, eventHandle ) { // We only want to do this special case on windows - if ( this.setInterval ) { + if ( jQuery.isWindow( this ) ) { this.onbeforeunload = eventHandle; } }, |