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
|
@ -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;
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue