+test("live/delegate immediate propagation", function() {
+ expect(2);
+
+ var $p = jQuery("#firstp"), $a = $p.find("a:first"), lastClick;
+
+ lastClick = "";
+ $a.live( "click", function(e) {
+ lastClick = "click1";
+ e.stopImmediatePropagation();
+ });
+ $a.live( "click", function(e) {
+ lastClick = "click2";
+ });
+ $a.trigger( "click" );
+ equals( lastClick, "click1", "live stopImmediatePropagation" );
+ $a.die( "click" );
+
+ lastClick = "";
+ $p.delegate( "a", "click", function(e) {
+ lastClick = "click1";
+ e.stopImmediatePropagation();
+ });
+ $p.delegate( "a", "click", function(e) {
+ lastClick = "click2";
+ });
+ $a.trigger( "click" );
+ equals( lastClick, "click1", "delegate stopImmediatePropagation" );
+ $p.undelegate( "click" );
+});
+