Effects: Check for anonymous content being exposed via document.activeElement. Fixes #8288 - Regression: jquery-ui animations focus fix causes Firefox Security Manager veto.

This commit is contained in:
Scott González 2012-05-07 10:32:42 -04:00
parent 650fe5c5db
commit a7e143b4fe

View 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.