Bug Tracker

Opened 15 years ago

Closed 14 years ago

Last modified 11 years ago

#3616 closed bug (invalid)

Double event execution

Reported by: webJ@… Owned by: brandon
Priority: major Milestone: 1.3
Component: event Version: 1.2.6
Keywords: Cc: webJ@…
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)

jquery_and_zend_framework.txt (8.4 KB) - added by webJ@… 15 years ago.
JQery Events with PHP (Zend Framework variables)

Download all attachments as: .zip

Change History (8)

comment:1 Changed 15 years ago by flesler

Cc: webJ@… added

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

Changed 15 years ago by webJ@…

JQery Events with PHP (Zend Framework variables)

comment:2 Changed 15 years ago by webJ@…

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.

comment:3 Changed 15 years ago by bundy

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

comment:4 Changed 15 years ago by webJ@…

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?

comment:5 Changed 15 years ago by webJ@…

Discovery!

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

comment:6 Changed 14 years ago by dmethvin

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

comment:7 Changed 14 years ago by dmethvin

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.