Skip to content

Commit a7e143b

Browse files
committed
Effects: Check for anonymous content being exposed via document.activeElement. Fixes #8288 - Regression: jquery-ui animations focus fix causes Firefox Security Manager veto.
1 parent 650fe5c commit a7e143b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

ui/jquery.effects.core.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,15 @@ $.extend( $.effects, {
428428
},
429429
active = document.activeElement;
430430

431+
// support: Firefox
432+
// Firefox incorrectly exposes anonymous content
433+
// https://bugzilla.mozilla.org/show_bug.cgi?id=561664
434+
try {
435+
active.id;
436+
} catch( e ) {
437+
active = document.body;
438+
}
439+
431440
element.wrap( wrapper );
432441

433442
// Fixes #7595 - Elements lose focus when wrapped.

0 commit comments

Comments
 (0)