From a7e143b4fe395baeda297ea96ef39921ea7f5a5d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Scott=20Gonz=C3=A1lez?= Date: Mon, 7 May 2012 10:32:42 -0400 Subject: [PATCH] Effects: Check for anonymous content being exposed via document.activeElement. Fixes #8288 - Regression: jquery-ui animations focus fix causes Firefox Security Manager veto. --- ui/jquery.effects.core.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ui/jquery.effects.core.js b/ui/jquery.effects.core.js index 5cf95696d..fe2bf298d 100644 --- a/ui/jquery.effects.core.js +++ b/ui/jquery.effects.core.js @@ -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. -- 2.39.5