Commit fa96f4bd authored by Dave Methvin's avatar Dave Methvin

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.
parent d2815ed7
...@@ -2324,6 +2324,9 @@ test("focusin bubbles", function() { ...@@ -2324,6 +2324,9 @@ test("focusin bubbles", function() {
var input = jQuery( "<input type='text' />" ).prependTo( "body" ), var input = jQuery( "<input type='text' />" ).prependTo( "body" ),
order = 0; order = 0;
// focus the element so DOM focus won't fire
input[0].focus();
jQuery( "body" ).bind( "focusin.focusinBubblesTest", function(){ jQuery( "body" ).bind( "focusin.focusinBubblesTest", function(){
equal( 1, order++, "focusin on the body second" ); equal( 1, order++, "focusin on the body second" );
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment