aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.effects.core.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2012-05-07 10:34:15 -0400
committerScott González <scott.gonzalez@gmail.com>2012-05-07 10:34:15 -0400
commitb676d5956137d8bc35087e3160813a025be436d0 (patch)
tree41a0ccc239624824ac3f3a986aa7edbec469befa /ui/jquery.effects.core.js
parent8445984ab7967bab43c22c73786883df2b420981 (diff)
downloadjquery-ui-b676d5956137d8bc35087e3160813a025be436d0.tar.gz
jquery-ui-b676d5956137d8bc35087e3160813a025be436d0.zip
Effects: Check for anonymous content being exposed via document.activeElement. Fixes #8288 - Regression: jquery-ui animations focus fix causes Firefox Security Manager veto.
(cherry picked from commit a7e143b4fe395baeda297ea96ef39921ea7f5a5d) Conflicts: ui/jquery.effects.core.js
Diffstat (limited to 'ui/jquery.effects.core.js')
-rw-r--r--ui/jquery.effects.core.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/ui/jquery.effects.core.js b/ui/jquery.effects.core.js
index eb848a13f..8ce867bd4 100644
--- a/ui/jquery.effects.core.js
+++ b/ui/jquery.effects.core.js
@@ -370,7 +370,16 @@ $.extend($.effects, {
}),
active = document.activeElement;
- element.wrap(wrapper);
+ // 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.
if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {