From fa96f4bdeedd5b134ea1923e1147b4282fa4d6fa Mon Sep 17 00:00:00 2001 From: Dave Methvin Date: Sun, 13 Nov 2011 21:32:07 -0500 Subject: [PATCH] Pre-focus the element so the browser won't fire focus while we're faking it. At this point the unit test is only testing our ability to fake-fire focusin the right way. These machinations are related to the problem in #6705. --- test/unit/event.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/unit/event.js b/test/unit/event.js index 8b3209733..70d616008 100644 --- a/test/unit/event.js +++ b/test/unit/event.js @@ -2324,6 +2324,9 @@ test("focusin bubbles", function() { var input = jQuery( "" ).prependTo( "body" ), order = 0; + // focus the element so DOM focus won't fire + input[0].focus(); + jQuery( "body" ).bind( "focusin.focusinBubblesTest", function(){ equal( 1, order++, "focusin on the body second" ); }); -- 2.39.5