#8796 closed bug (duplicate)
Executing .click() on a checkbox performs actions out of order
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | low | Milestone: | 1.next |
Component: | event | Version: | 1.5.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
A code sample says 1000 words:
<input type="checkbox" onclick="alert(this.checked?'yes':'no')" id="test" />
Pretty simply unchecked checkbox. Clicking on it will check it and then alert "Yes"
However, doing the same thing with jQuery:
$('#test').click()
Excutes in the opposite it order. It will alert "No", and then check the checkbox.
Suspect the FIRST action should be to change the checked status, followed by onclick() and other Click events.
Change History (4)
comment:1 Changed 12 years ago by
Component: | unfiled → event |
---|---|
Priority: | undecided → low |
Resolution: | → invalid |
Status: | new → closed |
comment:2 Changed 11 years ago by
Resolution: | invalid |
---|---|
Status: | closed → reopened |
comment:3 Changed 11 years ago by
Resolution: | → duplicate |
---|---|
Status: | reopened → closed |
Note: See
TracTickets for help on using
tickets.
jQuery cannot be accountable for the event firing order in the presence inline event handlers