From afeaf565bb0b91c399603a0ddd82a925cabef6aa Mon Sep 17 00:00:00 2001 From: =?utf8?q?Scott=20Gonz=C3=A1lez?= Date: Tue, 9 Jul 2013 14:13:24 -0400 Subject: [PATCH] Core tests: Explicitly focus the body during delayed .focus() test to avoid an issue in IE 8. --- tests/unit/core/core.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/unit/core/core.js b/tests/unit/core/core.js index 54d50d84e..acacfab9c 100644 --- a/tests/unit/core/core.js +++ b/tests/unit/core/core.js @@ -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" ); -- 2.39.5