Core: Handle IE11 bug with document.activeElement in iframes

Fixes #11539
Closes gh-1518

(cherry picked from commit 76c27556f4)
This commit is contained in:
Scott González 2015-03-24 14:10:37 -04:00
parent f2e8471f35
commit 413a9c99f8

View File

@ -57,6 +57,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;
},