diff options
author | Scott González <scott.gonzalez@gmail.com> | 2015-03-27 12:00:55 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2015-03-29 09:51:23 -0400 |
commit | 0de27b0609e8f6f9751ab7cce28492e18206d86d (patch) | |
tree | def3acc6724db324f444e1e403c4a981b6c00a78 | |
parent | c42a07a2e388d7aeec4af89d0be63f55b593f6aa (diff) | |
download | jquery-ui-0de27b0609e8f6f9751ab7cce28492e18206d86d.tar.gz jquery-ui-0de27b0609e8f6f9751ab7cce28492e18206d86d.zip |
Core: Work around more IE activeElement bugs
Closes gh-1523
-rw-r--r-- | ui/core.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ui/core.js b/ui/core.js index d6768441b..5e97e03c0 100644 --- a/ui/core.js +++ b/ui/core.js @@ -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> |