]> 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, 9 Jul 2013 18:13:24 +0000 (14:13 -0400)
tests/unit/core/core.js

index 54d50d84e4d59132afb90405fa7dd26c90fa90db..acacfab9cc3ec72b043d79eb832eb92e2bf7954b 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" );