Permalink
Browse files

Core: Work around more IE activeElement bugs

Closes gh-1523
  • Loading branch information...
1 parent c42a07a commit 0de27b0609e8f6f9751ab7cce28492e18206d86d @scottgonzalez scottgonzalez committed Mar 27, 2015
Showing with 7 additions and 0 deletions.
  1. +7 −0 ui/core.js
View
@@ -63,6 +63,13 @@ $.extend( $.ui, {
activeElement = document.body;
}
+ // Support: IE 9 - 11 only
+ // IE may return null instead of an element
+ // Interestingly, this only seems to occur when NOT in an iframe
+ if ( !activeElement ) {
+ activeElement = document.body;
+ }
+
// Support: IE 11 only
// IE11 returns a seemingly empty object in some cases when accessing
// document.activeElement from an <iframe>

0 comments on commit 0de27b0

Please sign in to comment.