Bug Tracker

Modify

Ticket #8748 (closed bug: duplicate)

Opened 2 years ago

Last modified 14 months ago

live('click') and live('submit') fire in the wrong order on IE

Reported by: david.n.arnold@… Owned by: dmethvin
Priority: low Milestone: 1.next
Component: event Version: 1.5.1
Keywords: Cc:
Blocking: Blocked by:

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:  http://jsfiddle.net/c9Pny/1/

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.

Change History

comment:1 Changed 2 years ago by rwaldron

  • Priority changed from undecided to low
  • Resolution set to duplicate
  • Status changed from new to closed
  • Component changed from unfiled to event

See: #8568 & #3781

Last edited 2 years ago by john (previous) (diff)

comment:2 Changed 2 years ago by rwaldron

Duplicate of #3781.

comment:3 Changed 2 years ago by dmethvin

  • Status changed from closed to reopened
  • Resolution duplicate deleted
  • Milestone changed from 1.next to 1.6

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.

comment:4 Changed 2 years ago by dmethvin

  • Owner set to dmethvin
  • Status changed from reopened to assigned

comment:5 Changed 2 years ago by david.n.arnold@…

@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.

comment:6 Changed 2 years ago by john

  • Milestone changed from 1.6 to 1.next

comment:7 Changed 21 months ago by dmethvin

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

Grouping under one ticket.

comment:8 Changed 21 months ago by dmethvin

Duplicate of #7061.

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.