X-Git-Url: http://git.asbjorn.it/?p=jquery.git;a=blobdiff_plain;f=test%2Funit%2Fevent.js;h=829ef7bcb49b8e2f00c0a1f76c0e039bf788e17b;hp=a51659ca4699444fa3e56e475cc075a7f841d2e3;hb=88068f82c199847d3679b130664dd91cc2e89f00;hpb=39addc87a37b32be19f2c58ec8babe752c0243e1 diff --git a/test/unit/event.js b/test/unit/event.js index a51659c..829ef7b 100644 --- a/test/unit/event.js +++ b/test/unit/event.js @@ -1843,7 +1843,21 @@ test("window resize", function() { ok( !jQuery(window).data("__events__"), "Make sure all the events are gone." ); }); - +test("focusin bubbles", function(){ + //create an input and focusin on it + var input = jQuery(""), + order = 0; + input.appendTo(document.body); + jQuery(document.body).bind("focusin.focusinBubblesTest",function(){ + equals(1,order++,"focusin on the body second") + }) + input.bind("focusin.focusinBubblesTest",function(){ + equals(0,order++,"focusin on the element first") + }) + input[0].focus(); + input.remove(); + jQuery(document.body).unbind("focusin.focusinBubblesTest"); +}) /* test("jQuery(function($) {})", function() { stop();