Skip to content

Commit

Permalink
Pre-focus the element so the browser won't fire focus while we're fak…
Browse files Browse the repository at this point in the history
…ing 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.
  • Loading branch information
dmethvin committed Nov 14, 2011
1 parent d2815ed commit fa96f4b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/unit/event.js
Expand Up @@ -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" );
});
Expand Down

0 comments on commit fa96f4b

Please sign in to comment.