File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -1981,7 +1981,7 @@ test("window resize", function() {
1981
1981
} ) ;
1982
1982
1983
1983
test ( "focusin bubbles" , function ( ) {
1984
- expect ( 4 ) ;
1984
+ expect ( 5 ) ;
1985
1985
1986
1986
var input = jQuery ( '<input type="text" />' ) . prependTo ( "body" ) ,
1987
1987
order = 0 ;
@@ -1996,9 +1996,14 @@ test("focusin bubbles", function() {
1996
1996
1997
1997
// DOM focus method
1998
1998
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
+
1999
2005
// jQuery trigger, which calls DOM focus
2000
2006
order = 0 ;
2001
- input [ 0 ] . blur ( ) ;
2002
2007
input . trigger ( "focus" ) ;
2003
2008
2004
2009
input . remove ( ) ;
You can’t perform that action at this time.
0 commit comments