Bug Tracker

Modify

Ticket #10005 (closed bug: duplicate)

Opened 3 years ago

Last modified 2 years ago

Click event function does not fire at consistent times.

Reported by: k4emic@… Owned by:
Priority: low Milestone:
Component: event Version: 1.6.2
Keywords: Cc:
Blocking: Blocked by:

Description (last modified by rwaldron) (diff)

If using .click() on a checkbox element, the returned value from .is('checked') from inside the elements .click() function will return the opposite of the actual state. If you click the checkbox, the .is('checked') will return the correct state.

[ Example fiddle]

This issue has been around for a while, [ this blog entry] is from 2009.

Callbacks attached to .change() works consistently.

Change History

comment:1 Changed 3 years ago by anonymous

This bug is reproducible on Firefox 5.0 and Google Chrome 13.0.782.107 m on windows 7 64 bit with jQuery 1.3.2, 1.4.4, 1.5.2 and 1.6.2.

comment:2 Changed 3 years ago by rwaldron

  • Priority changed from undecided to low
  • Resolution set to worksforme
  • Status changed from new to closed
  • Component changed from unfiled to event
  • Milestone changed from None to 1.6.3

Callbacks attached to .change() works consistently.

comment:3 Changed 3 years ago by k4emic@…

Was this report closed because another function works as intended, while this one doesn't?

If so, this problem should be mentioned on the documentation page for click (since comments are closed).

comment:4 Changed 3 years ago by rwaldron

  • Description modified (diff)

You're missing the point - click is the wrong event to use with checkboxes. It's like reporting that mousedown doesn't work when you hit the spacebar on your keyboard

comment:5 Changed 3 years ago by anonymous

This but was introduced in jquery-1.4.1. On jquery-1.4 click method works fine.

comment:6 Changed 3 years ago by dmethvin

  • Milestone 1.6.3 deleted

comment:7 Changed 2 years ago by dmethvin

  • Status changed from closed to reopened
  • Resolution worksforme deleted

comment:8 Changed 2 years ago by dmethvin

  • Status changed from reopened to closed
  • Resolution set to duplicate

comment:9 Changed 2 years ago by dmethvin

Duplicate of #3827.

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.