Side navigation
#8748 closed bug (duplicate)
Opened April 01, 2011 10:09PM UTC
Closed September 08, 2011 07:25PM UTC
Last modified March 14, 2012 05:26PM UTC
live('click') and live('submit') fire in the wrong order on IE
Reported by: | david.n.arnold@gmail.com | Owned by: | dmethvin |
---|---|---|---|
Priority: | low | Milestone: | 1.next |
Component: | event | Version: | 1.5.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Live events are fired in the order they are bound and do not respect natural event ordering between click and submit.
Click should always fire before submit so that page logic has a chance to stop the event and prevent a submit. Consider validation as a real-world scenario where the order of event firing is critically important.
jsFiddle to demonstrate bug:
Notice that in the Bind form, events are ordered correctly.
Please disregard the duplicate submit events when pressing enter in the Live form. I believe that is bug #7444 and is not the subject of this ticket.
Other reference: #7922 fixed the fact that live('click') was not firing at all. This ticket, however, is to point out that they are firing in the wrong order.
Attachments (0)
Change History (8)
Changed April 02, 2011 04:15PM UTC by comment:1
_comment0: | See: http://bugs.jquery.com/ticket/8568 & http://bugs.jquery.com/ticket/3781 → 1303075881372027 |
---|---|
component: | unfiled → event |
priority: | undecided → low |
resolution: | → duplicate |
status: | new → closed |
Changed April 02, 2011 06:19PM UTC by comment:3
milestone: | 1.next → 1.6 |
---|---|
resolution: | duplicate |
status: | closed → reopened |
I am pretty sure this is a different case. The change
event has to be synthesized in IE for some cases and for those times the synthesized event fires when the piggybacked event runs. I'll take this ticket and see if we can do something about the event order.
Changed April 02, 2011 06:19PM UTC by comment:4
owner: | → dmethvin |
---|---|
status: | reopened → assigned |
Changed April 02, 2011 09:24PM UTC by comment:5
@dmethvin thanks for picking this one up!
@rwaldron This is definitely not a dupe. I realize that expecting complete control over event ordering is madness. However, the DOM level 2 event spec states that certain events (namely, click) have default actions which should be cancelable with preventDefault (section 1.2.4). If submit fires before click, I cannot prevent it.
Currently, this works fine in all browsers except IE. I think this is just a leaky abstraction from the contortions necessary to implement live on IE.
Changed April 25, 2011 07:27PM UTC by comment:6
milestone: | 1.6 → 1.next |
---|
Changed September 08, 2011 07:25PM UTC by comment:7
resolution: | → duplicate |
---|---|
status: | assigned → closed |
Grouping under one ticket.
See: #8568 & #3781