Skip to content

Commit e3ff671

Browse files
committed
Core: Work around more IE activeElement bugs
Closes jquerygh-1523 (cherry picked from commit 0de27b0)
1 parent eb13525 commit e3ff671

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
@@ -57,6 +57,13 @@ $.extend( $.ui, {
5757
activeElement = document.body;
5858
}
5959

60+
// Support: IE 9 - 11 only
61+
// IE may return null instead of an element
62+
// Interestingly, this only seems to occur when NOT in an iframe
63+
if ( !activeElement ) {
64+
activeElement = document.body;
65+
}
66+
6067
// Support: IE 11 only
6168
// IE11 returns a seemingly empty object in some cases when accessing
6269
// document.activeElement from an <iframe>

0 commit comments

Comments
 (0)