Skip to content

Commit 459bd7f

Browse files
committed
Followup commit for #7340 test case; make sure second test fires properly on IE by focusing to another element rather than blurring off the first.
1 parent 6c28a39 commit 459bd7f

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

test/unit/event.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1981,7 +1981,7 @@ test("window resize", function() {
19811981
});
19821982

19831983
test("focusin bubbles", function() {
1984-
expect(4);
1984+
expect(5);
19851985

19861986
var input = jQuery( '<input type="text" />' ).prependTo( "body" ),
19871987
order = 0;
@@ -1996,9 +1996,14 @@ test("focusin bubbles", function() {
19961996

19971997
// DOM focus method
19981998
input[0].focus();
1999+
2000+
// To make the next focus test work, we need to take focus off the input.
2001+
// This will fire another focusin event, so set order to reflect that.
2002+
order = 1;
2003+
jQuery("#text1")[0].focus();
2004+
19992005
// jQuery trigger, which calls DOM focus
20002006
order = 0;
2001-
input[0].blur();
20022007
input.trigger( "focus" );
20032008

20042009
input.remove();

0 commit comments

Comments
 (0)