From: Scott González Date: Tue, 9 Jul 2013 18:13:24 +0000 (-0400) Subject: Core tests: Explicitly focus the body during delayed .focus() test to avoid an issue... X-Git-Tag: 1.10.4~60 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d1b764b5f5704a26abe411838a2cc3cc81e79a82;p=jquery-ui.git Core tests: Explicitly focus the body during delayed .focus() test to avoid an issue in IE 8. (cherry picked from commit afeaf565bb0b91c399603a0ddd82a925cabef6aa) --- 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" );