From 0de27b0609e8f6f9751ab7cce28492e18206d86d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Scott=20Gonz=C3=A1lez?= Date: Fri, 27 Mar 2015 12:00:55 -0400 Subject: [PATCH] Core: Work around more IE activeElement bugs Closes gh-1523 --- ui/core.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ui/core.js b/ui/core.js index d6768441b..5e97e03c0 100644 --- a/ui/core.js +++ b/ui/core.js @@ -63,6 +63,13 @@ $.extend( $.ui, { activeElement = document.body; } + // Support: IE 9 - 11 only + // IE may return null instead of an element + // Interestingly, this only seems to occur when NOT in an iframe + if ( !activeElement ) { + activeElement = document.body; + } + // Support: IE 11 only // IE11 returns a seemingly empty object in some cases when accessing // document.activeElement from an