Bug with change delegation

Bug with change delegation

There is a bug if you are delegating for click and change on the same element.  If the click liveHandler  runs before the change liveHandler, the change liveHandler event will never be fired. 

The FIX

Line 2297 of the nightly build (the testChange function that tests if a change has happened) looks like:

  1. if ( data != null || val ) {
  2.   e.type = "change";
  3.   return jQuery.event.trigger( e, arguments[1], elem );
  4. }

it should be changed to:

  1. if ( data != null || val ) {
  2.   e.type = "change";
  3.   e.liveFired = null;
  4.   return jQuery.event.trigger( e, arguments[1], elem );
  5. }

This will prevent previously set lifeFired events from blocking new change events.