]> source.dussan.org Git - jquery.git/commitdiff
Tweak live-blur() test to silence a IE8 swarm fail.
authorDave Methvin <dave.methvin@gmail.com>
Wed, 12 Oct 2011 02:55:10 +0000 (22:55 -0400)
committerDave Methvin <dave.methvin@gmail.com>
Wed, 12 Oct 2011 02:55:10 +0000 (22:55 -0400)
test/unit/event.js

index 83f83469abb2b1ed3230785d5f346df4383ed8fe..91940a41770680fdf1d96c1ebd9856f944e6e281 100644 (file)
@@ -1497,15 +1497,14 @@ test(".live()/.die()", function() {
        jQuery("#nothiddendiv div").die("click");
 
        // div must have a tabindex to be focusable
-       jQuery("#nothiddendiv div").attr("tabindex", "0")[0].focus();
-
-       jQuery("#nothiddendiv div").live("blur", function(){
-               ok( true, "Live div trigger blur." );
-       });
-
-       jQuery("#nothiddendiv div").trigger("blur");
-
-       jQuery("#nothiddendiv div").die("blur");
+       jQuery("#nothiddendiv div")
+               .attr("tabindex", "0")
+               .live("blur", function(){
+                       ok( true, "Live div trigger blur." );
+               })
+               .focus()
+               .trigger("blur")
+               .die("blur");
 });
 
 test("die all bound events", function(){