Bug Tracker

Modify

Ticket #1618 (closed bug: fixed)

Opened 6 years ago

Last modified 6 years ago

Bind & unbind

Reported by: victorbartel Owned by:
Priority: critical Milestone: 1.2.2
Component: event Version: 1.2.1
Keywords: bind unbind Cc:
Blocking: Blocked by:

Description

Greetings,

It seems that there is a bug in jquery 1.2, related with events management(bind/unbind). I guess that I had something like memory leak. When I bind/unbind some function for first time it seems to work without problems but if I bind my function again and again, this one will be executed n+1 times when event is handled, and so on for each function execution. With jquery 1.1.4 it works great.

I prepared a demonstration for this bug.
Example with jquery 1.2  http://creamarketing.net/jqgridview/index2.html
Example with jquery 1.1.4  http://creamarketing.net/jqgridview/index.html

In this page you will see a gridview component in the top and console element in the bottom. Each time when you try to resize grid column, the console will print out cursorX position. During the test in index2.html page you will observe that for each resizing, cursorX value will be duplicate. To realize resizing functionality I used bind/unbind methods. Excuse me for poor explication, but it’s more easy to understand trying my examples. Thank you in advanced.



--
Best regards,
Victor Bartel

Change History

comment:1 Changed 6 years ago by bfattori

We're experiencing a similar issue whereby the events that are triggered via a call to the event function on the jQuery object fire properly [a call to click()]. However, clicking the DOM element fires the event repeatedly, even though we've used unbind("click")

comment:2 Changed 6 years ago by davidserduke

Take a look at the summary for this ticket.

 http://dev.jquery.com/ticket/1731

I tried the original proposed one line change for 1731 (without the other IE leak changes) and it fixes the problem in this test case.

comment:3 Changed 6 years ago by brandon

  • Status changed from new to closed
  • Version changed from 1.2 to 1.2.1
  • Resolution set to fixed
  • Milestone changed from 1.2.1 to 1.2.2

Fixed in Rev [3578]

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.