A temporary workaround for #8018 that avoids any chance of compatibility-breaking...
authorAlex Sexton <AlexSexton@gmail.com>
Fri, 18 Feb 2011 00:01:30 +0000 (18:01 -0600)
committerColin Snover <github.com@zetafleet.com>
Fri, 18 Feb 2011 00:01:30 +0000 (18:01 -0600)
src/event.js

index daafe54..1bfb4bb 100644 (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;