]> source.dussan.org Git - jquery-ui.git/commitdiff
Effects: Check for anonymous content being exposed via document.activeElement. Fixes...
authorScott González <scott.gonzalez@gmail.com>
Mon, 7 May 2012 14:32:42 +0000 (10:32 -0400)
committerScott González <scott.gonzalez@gmail.com>
Mon, 7 May 2012 14:32:42 +0000 (10:32 -0400)
ui/jquery.effects.core.js

index 5cf95696dcfffd1d3744b2366b3badb5764fad26..fe2bf298da538b86d1440c39585e8901455656d5 100644 (file)
@@ -428,6 +428,15 @@ $.extend( $.effects, {
                        },
                        active = document.activeElement;
 
+               // support: Firefox
+               // Firefox incorrectly exposes anonymous content
+               // https://bugzilla.mozilla.org/show_bug.cgi?id=561664
+               try {
+                       active.id;
+               } catch( e ) {
+                       active = document.body;
+               }
+
                element.wrap( wrapper );
 
                // Fixes #7595 - Elements lose focus when wrapped.