Skip to content

Commit 76c2755

Browse files
committed
Core: Handle IE11 bug with document.activeElement in iframes
Fixes #11539 Closes gh-1518
1 parent 1696405 commit 76c2755

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

ui/core.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,13 @@ $.extend( $.ui, {
6363
activeElement = document.body;
6464
}
6565

66+
// Support: IE 11 only
67+
// IE11 returns a seemingly empty object in some cases when accessing
68+
// document.activeElement from an <iframe>
69+
if ( !activeElement.nodeName ) {
70+
activeElement = document.body;
71+
}
72+
6673
return activeElement;
6774
},
6875

0 commit comments

Comments
 (0)