Bug Tracker

Modify

Ticket #11798 (closed bug: invalid)

Opened 12 months ago

Last modified 12 months ago

Event delegation does not work for some widgets in 1.7 when it worked in 1.4

Reported by: anonymous Owned by: anonymous
Priority: undecided Milestone: None
Component: unfiled Version: 1.7.2
Keywords: Cc:
Blocking: Blocked by:

Description

I am sure this ticket will be invalidated because it is hard to prove that JQuery is too blame. But I have a thread going with Infragistics:

 http://community.infragistics.com/forums/p/69360/352161.aspx#352161

They are telling me this is likely a JQuery bug. The problem still occurs in JQuery 1.7.2. Even if it is an issue with Infragistics code, there does seem to be evidence that widgets designed and working against JQuery 1.4.4 can no longer use event delegation in JQuery 1.7. So something must have changed. It doesn't seem possible to simply port delegate syntax to the new .on() syntax in some cases, and the delegate syntax can stop working. That could be something worth looking into.

This may keep me from upgrading to 1.7, because I can achieve delegated event behavior with Infragistics in JQuery 1.4.4, or as the Infragistics guy suggests, I have to stick to direct event binding only.

I am sure I didn't follow all the rules, so feel free to close the ticket, but I wanted to bring this to your attention, and felt like this would get lost on a forum.

Change History

comment:1 Changed 12 months ago by dmethvin

  • Owner set to anonymous
  • Status changed from new to pending

Yes, it will be hard to tell if jQuery is to blame without a test case. Even the thread you linked did not have anything but some code snippets in the post, which make it hard to reproduce the issue. Please go to jsFiddle.net and create one, then post the link back here.

comment:2 Changed 12 months ago by codmon23

The original thread in the link has answers now. It turns out the Infragistics control creates a disembodied list at the end of the body with the drop down items in it. The widget event is fired out of that list (as opposed to the original target) and never bubbles through an element that matches the selector sent to the .on() method. I need to verify the vendor's assertion that this worked via the delegate syntax in version 1.4.4. It seems like it would fail for the same reasons. This does not seem like a jquery issue to me. I think this can be closed.

comment:3 Changed 12 months ago by dmethvin

  • Status changed from pending to closed
  • Resolution set to invalid

There was a bug in some earlier versions of jQuery that would fire .trigger()ed events on elements that were not attached to the document. That was fixed, so perhaps you are seeing the result of the correct operation.

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.