Bug Tracker

Opened 7 years ago

Closed 7 years ago

#11798 closed bug (invalid)

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:
Blocked by: Blocking:


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:


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 (3)

comment:1 Changed 7 years ago by dmethvin

Owner: set to anonymous
Status: newpending

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 7 years 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 7 years ago by dmethvin

Resolution: invalid
Status: pendingclosed

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.

Note: See TracTickets for help on using tickets.