Side navigation
#8796 closed bug (duplicate)
Opened April 07, 2011 02:53AM UTC
Closed November 18, 2011 03:17PM UTC
Last modified November 18, 2011 03:17PM UTC
Executing .click() on a checkbox performs actions out of order
Reported by: | spoonlikesham@gmail.com | 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.
Attachments (0)
Change History (4)
Changed April 07, 2011 01:55PM UTC by comment:1
component: | unfiled → event |
---|---|
priority: | undecided → low |
resolution: | → invalid |
status: | new → closed |
Changed November 18, 2011 03:17PM UTC by comment:2
resolution: | invalid |
---|---|
status: | closed → reopened |
Changed November 18, 2011 03:17PM UTC by comment:3
resolution: | → duplicate |
---|---|
status: | reopened → closed |
jQuery cannot be accountable for the event firing order in the presence inline event handlers