aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2015-03-24 14:10:37 -0400
committerScott González <scott.gonzalez@gmail.com>2015-03-24 18:28:12 -0400
commit76c27556f48bea48d3787c241d35e190d46c3245 (patch)
tree0e76fa69acda521e85dfc69ed0dfab60a680b2e7 /ui
parent1696405c09a4308ed2f17fff410907e3989b59c0 (diff)
downloadjquery-ui-76c27556f48bea48d3787c241d35e190d46c3245.tar.gz
jquery-ui-76c27556f48bea48d3787c241d35e190d46c3245.zip
Core: Handle IE11 bug with document.activeElement in iframes
Fixes #11539 Closes gh-1518
Diffstat (limited to 'ui')
-rw-r--r--ui/core.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/ui/core.js b/ui/core.js
index eaf11d0a8..a8167d683 100644
--- a/ui/core.js
+++ b/ui/core.js
@@ -63,6 +63,13 @@ $.extend( $.ui, {
activeElement = document.body;
}
+ // Support: IE 11 only
+ // IE11 returns a seemingly empty object in some cases when accessing
+ // document.activeElement from an <iframe>
+ if ( !activeElement.nodeName ) {
+ activeElement = document.body;
+ }
+
return activeElement;
},