A temporary workaround for #8018 that avoids any chance of compatibility-breaking changes until a proper fix can be landed in 1.6.

This commit is contained in:
Alex Sexton 2011-02-17 18:01:30 -06:00 committed by Colin Snover
parent 4b91b918a3
commit 752db8fffe

View file

@ -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;