Skip to content

Commit 2d5f866

Browse files
committed
Use prepend for the focuin test (to avoid making the test suite jump).
1 parent f009fb2 commit 2d5f866

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

test/unit/event.js

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1843,21 +1843,27 @@ test("window resize", function() {
18431843

18441844
ok( !jQuery(window).data("__events__"), "Make sure all the events are gone." );
18451845
});
1846-
test("focusin bubbles", function(){
1846+
1847+
test("focusin bubbles", function() {
18471848
//create an input and focusin on it
1848-
var input = jQuery("<input/>"),
1849-
order = 0;
1850-
input.appendTo(document.body);
1851-
jQuery(document.body).bind("focusin.focusinBubblesTest",function(){
1849+
var input = jQuery("<input/>"), order = 0;
1850+
1851+
input.prependTo("body");
1852+
1853+
jQuery("body").bind("focusin.focusinBubblesTest",function(){
18521854
equals(1,order++,"focusin on the body second")
1853-
})
1855+
});
1856+
18541857
input.bind("focusin.focusinBubblesTest",function(){
18551858
equals(0,order++,"focusin on the element first")
1856-
})
1859+
});
1860+
18571861
input[0].focus();
18581862
input.remove();
1859-
jQuery(document.body).unbind("focusin.focusinBubblesTest");
1860-
})
1863+
1864+
jQuery("body").unbind("focusin.focusinBubblesTest");
1865+
});
1866+
18611867
/*
18621868
test("jQuery(function($) {})", function() {
18631869
stop();

0 commit comments

Comments
 (0)