related, match, fn, elem, j, i, l, data,
live = jQuery.extend({}, jQuery.data( this, "events" ).live);
+ // Make sure we avoid non-left-click bubbling in Firefox (#3861)
+ if ( event.button && event.type === "click" ) {
+ return;
+ }
+
for ( j in live ) {
fn = live[j];
if ( fn.live === event.type ||
});
test(".live()/.die()", function() {
- expect(61);
+ expect(62);
var submit = 0, div = 0, livea = 0, liveb = 0;
equals( livea, 6, "stopPropagation Click on inner div" );
equals( liveb, 3, "stopPropagation Click on inner div" );
+ // Make sure click events only fire with primary click
+ var event = jQuery.Event("click");
+ event.button = 1;
+ jQuery("div#nothiddendiv").trigger(event);
+
+ equals( livea, 6, "live secondary click" );
+
jQuery("div#nothiddendivchild").die("click");
jQuery("div#nothiddendiv").die("click");
jQuery("div").die("click");