Bug Tracker

Opened 10 years ago

Closed 10 years ago

#6213 closed bug (invalid)

.click() fires to often since 1.4.2

Reported by: koder Owned by:
Priority: Milestone: 1.4.3
Component: event Version: 1.4.2
Keywords: unbind event click Cc:
Blocked by: Blocking:

Description

I experienced a very strange bug, moving from 1.4.1 to 1.4.2:

I attach a .click() event to an image, calling func() when it fires.

In this func(), the first thing I do, is .unbind() everything on that image. Making sure you can never click twice.

This worked fine in 1.3.x and 1.4.0 and 1.4.1. But it the new 1.4.2, it doesn't always work. And clicking the image once can cause it to fire many times! I have seen 40 times and more.

Change History (1)

comment:1 Changed 10 years ago by john

Resolution: invalid
Status: newclosed

If you want to prevent other functions from firing, that are bound to the same element, you should be using .stopImmediatePropagation(). Calling just .unbind() won't have that effect (this was actually a bug fix in 1.4.2).

Note: See TracTickets for help on using tickets.