Bug Tracker

Ticket #3616 (closed bug: invalid)

Opened 6 years ago

Last modified 2 years ago

Double event execution

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

Description

I have found that sometimes an event is executed twice. $('#submit').click(function() { ... this executed twice ... } Dont know why.

Attachments

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

Change History

comment:1 Changed 6 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 6 years ago by webJ@…

JQery Events with PHP (Zend Framework variables)

comment:2 Changed 6 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 6 years ago by bundy

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

comment:4 Changed 6 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 6 years ago by webJ@…

Discovery!

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

comment:6 Changed 6 years ago by dmethvin

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

comment:7 Changed 6 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to invalid
Note: See TracTickets for help on using tickets.