Skip to main content

Bug Tracker

Side navigation

#3616 closed bug (invalid)

Opened November 17, 2008 12:00PM UTC

Closed January 15, 2009 01:21AM UTC

Last modified March 14, 2012 11:47PM UTC

Double event execution

Reported by: webJ@cob Owned by: brandon
Priority: major Milestone: 1.3
Component: event Version: 1.2.6
Keywords: Cc: webJ@cob
Blocked by: Blocking:
Description

I have found that sometimes an event is executed twice.

$('#submit').click(function() { ... this executed twice ... }

Dont know why.

Attachments (1)
Change History (7)

Changed November 17, 2008 06:02PM UTC by flesler comment:1

cc: → webJ@cob

Can you provide a test case ? a minimalistic html file with the requires html and js to reproduce the problem

Changed November 17, 2008 07:27PM UTC by webJ@cob comment:2

I attached file with code where I have problems.

Mainly its all about:

$('#submit_nowe_zam<?=$this->escape($klienci->id)?>').click(function() {

$('#zapis<?=$this->escape($klienci->id)?>').click(function() {

I get ajax success and java script alerts twice, unfortunately.

Changed November 17, 2008 10:37PM UTC by bundy comment:3

I have the exact same issue with a plugin a wrote for my webapp..

Changed November 18, 2008 01:10AM UTC by webJ@cob comment:4

I have tested it with: dbclick, mouseup, mousedown and it accures everytime. Also thought it was a browser bug but its the same on IE6, IE7 and Firefox 3.

When setting asynchronous transmission on ajax, it waits a second and gives an unwanted, second execution (doubled).

Does anyone found a solution (patch) to that?

Changed November 18, 2008 09:24AM UTC by webJ@cob comment:5

Discovery!

When event handler is outside $(document).ready(function() {... everthing seems to be ok.

Changed January 11, 2009 04:22AM UTC by dmethvin comment:6

Sounds like this was not a jQuery problem so I will close the ticket.

Changed January 15, 2009 01:21AM UTC by dmethvin comment:7

resolution: → invalid
status: newclosed