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.
This commit is contained in:
Dave Methvin
2011-11-13 21:32:07 -05:00
parent d2815ed750
commit fa96f4bdee

View File

@@ -2324,6 +2324,9 @@ test("focusin bubbles", function() {
var input = jQuery( "<input type='text' />" ).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" );
});