Skip to content

Commit

Permalink
A temporary workaround for #8018 that avoids any chance of compatibil…
Browse files Browse the repository at this point in the history
…ity-breaking changes until a proper fix can be landed in 1.6.
  • Loading branch information
SlexAxton authored and csnover committed Feb 18, 2011
1 parent 4b91b91 commit 752db8f
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/event.js
Original file line number Diff line number Diff line change
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 752db8f

Please sign in to comment.