Skip to content

Commit

Permalink
Effects: Check for anonymous content being exposed via document.activ…
Browse files Browse the repository at this point in the history
…eElement. Fixes #8288 - Regression: jquery-ui animations focus fix causes Firefox Security Manager veto.
  • Loading branch information
scottgonzalez committed May 7, 2012
1 parent 650fe5c commit a7e143b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ui/jquery.effects.core.js
Expand Up @@ -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.
Expand Down

0 comments on commit a7e143b

Please sign in to comment.