From d1b764b5f5704a26abe411838a2cc3cc81e79a82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?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. (cherry picked from commit afeaf565bb0b91c399603a0ddd82a925cabef6aa) --- 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 78a225338..ab19aadeb 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" );