Skip to content
Permalink
Browse files
Effects: Check for anonymous content being exposed via document.activ…
…eElement. Fixes #8288 - Regression: jquery-ui animations focus fix causes Firefox Security Manager veto.

(cherry picked from commit a7e143b)

Conflicts:

	ui/jquery.effects.core.js
  • Loading branch information
scottgonzalez committed May 7, 2012
1 parent 8445984 commit b676d5956137d8bc35087e3160813a025be436d0
Showing with 10 additions and 1 deletion.
  1. +10 −1 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 ) ) {

0 comments on commit b676d59

Please sign in to comment.