]> source.dussan.org Git - jquery-ui.git/commitdiff
Core: Work around more IE activeElement bugs
authorScott González <scott.gonzalez@gmail.com>
Fri, 27 Mar 2015 16:00:55 +0000 (12:00 -0400)
committerScott González <scott.gonzalez@gmail.com>
Sun, 29 Mar 2015 13:51:23 +0000 (09:51 -0400)
Closes gh-1523

ui/core.js

index d6768441bb906b808ee916f33b54a3929a2bedb0..5e97e03c008e696a595b9bb5636905c2faadd470 100644 (file)
@@ -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>