]> source.dussan.org Git - jquery.git/commitdiff
Followup commit for #7340 test case; make sure second test fires properly on IE by...
authorDave Methvin <dave.methvin@gmail.com>
Thu, 31 Mar 2011 13:10:30 +0000 (09:10 -0400)
committerDave Methvin <dave.methvin@gmail.com>
Thu, 31 Mar 2011 13:10:30 +0000 (09:10 -0400)
test/unit/event.js

index 1e40e0f3e6024cfb2c74d57d78c11e0ae57acfb6..2a6d8a669883d349c227ce35d77e9692dea7c39c 100644 (file)
@@ -1981,7 +1981,7 @@ test("window resize", function() {
 });
 
 test("focusin bubbles", function() {
-       expect(4);
+       expect(5);
        
        var input = jQuery( '<input type="text" />' ).prependTo( "body" ), 
                order = 0;
@@ -1996,9 +1996,14 @@ test("focusin bubbles", function() {
 
        // DOM focus method
        input[0].focus();
+       
+       // To make the next focus test work, we need to take focus off the input.
+       // This will fire another focusin event, so set order to reflect that.
+       order = 1;
+       jQuery("#text1")[0].focus();
+       
        // jQuery trigger, which calls DOM focus
        order = 0;
-       input[0].blur();
        input.trigger( "focus" );
 
        input.remove();