aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2012-05-07 10:32:42 -0400
committerScott González <scott.gonzalez@gmail.com>2012-05-07 10:32:42 -0400
commita7e143b4fe395baeda297ea96ef39921ea7f5a5d (patch)
tree89d8efe91272a08f896d06f20cbde37a3243d6f3
parent650fe5c5db7fb46b7ad3296f99dcb82b312f4284 (diff)
downloadjquery-ui-a7e143b4fe395baeda297ea96ef39921ea7f5a5d.tar.gz
jquery-ui-a7e143b4fe395baeda297ea96ef39921ea7f5a5d.zip
Effects: Check for anonymous content being exposed via document.activeElement. Fixes #8288 - Regression: jquery-ui animations focus fix causes Firefox Security Manager veto.
-rw-r--r--ui/jquery.effects.core.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/ui/jquery.effects.core.js b/ui/jquery.effects.core.js
index 5cf95696d..fe2bf298d 100644
--- a/ui/jquery.effects.core.js
+++ b/ui/jquery.effects.core.js
@@ -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.