X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=test%2Funit%2Fevent.js;h=43a4542f0c427627bc88500cfadc32a8fbd22c5e;hb=9bcd2b370b4aa72cc60af85d0f8a0872d0d17a0a;hp=248094a9666ca3f08ac70b0b96316172c42fbdaf;hpb=b740fe5632b8731a140f16a2f6855910ea6957b9;p=jquery.git diff --git a/test/unit/event.js b/test/unit/event.js index 248094a..43a4542 100644 --- a/test/unit/event.js +++ b/test/unit/event.js @@ -1,7 +1,7 @@ module("event"); test("bind()", function() { - expect(18); + expect(19); var handler = function(event) { ok( event.data, "bind() with data, check passed data exists" ); @@ -85,6 +85,11 @@ test("bind()", function() { $("#nonnodes").contents().bind("tester", function () { equals(this.nodeType, 1, "Check node,textnode,comment bind just does real nodes" ); }).trigger("tester"); + + // Make sure events stick with appendTo'd elements (which are cloned) #2027 + $("test").click(function(){ return false; }).appendTo("p"); + ok( $("a.test:first").triggerHandler("click") === false, "Handler is bound to appendTo'd elements" ); + reset(); }); test("click()", function() {