Skip to content

Commit

Permalink
Core: Handle IE11 bug with document.activeElement in iframes
Browse files Browse the repository at this point in the history
Fixes #11539
Closes gh-1518
  • Loading branch information
scottgonzalez committed Mar 24, 2015
1 parent 1696405 commit 76c2755
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ui/core.js
Expand Up @@ -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;
},

Expand Down

0 comments on commit 76c2755

Please sign in to comment.