]> source.dussan.org Git - jquery-ui.git/commitdiff
Core tests: Explicitly focus the body during delayed .focus() test to avoid an issue...
authorScott González <scott.gonzalez@gmail.com>
Tue, 9 Jul 2013 18:13:24 +0000 (14:13 -0400)
committerScott González <scott.gonzalez@gmail.com>
Tue, 26 Nov 2013 16:29:35 +0000 (11:29 -0500)
(cherry picked from commit afeaf565bb0b91c399603a0ddd82a925cabef6aa)

tests/unit/core/core.js

index 78a225338c9bce311180ef1998b43451b923f690..ab19aadeb1ab9397725fdea327ffaaf64fc9c018 100644 (file)
@@ -16,6 +16,12 @@ asyncTest( "focus - original functionality", function() {
 
 asyncTest( "focus", function() {
        expect( 2 );
+
+       // support: IE 8
+       // IE sometimes gets confused about what's focused if we don't explicitly
+       // focus a different element first
+       $( "body" ).focus();
+
        $( "#inputTabindex0" )
                .one( "focus", function() {
                        ok( true, "event triggered" );