Skip to content

Commit

Permalink
A fix for #8018 - avoid changing functionality in minor release 1.5.1…
Browse files Browse the repository at this point in the history
… - move to better fix in major release. This just avoids errors.
  • Loading branch information
SlexAxton committed Feb 17, 2011
1 parent 4b91b91 commit e5b4a4c
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/event.js
Expand Up @@ -23,11 +23,16 @@ jQuery.event = {
return;
}

// For whatever reason, IE has trouble passing the window object
// around, causing it to be cloned in the process
if ( jQuery.isWindow( elem ) && ( elem !== window && !elem.frameElement ) ) {
elem = window;
}
// TODO :: Use a try/catch until it's safe to pull this out (likely 1.6)
// Minor release fix for bug #8018
try {
// For whatever reason, IE has trouble passing the window object
// around, causing it to be cloned in the process
if ( jQuery.isWindow( elem ) && ( elem !== window && !elem.frameElement ) ) {
elem = window;
}
}
catch ( e ) {}

if ( handler === false ) {
handler = returnFalse;
Expand Down

0 comments on commit e5b4a4c

Please sign in to comment.