Make sure that the right event type is always triggered (was causing problems with UI's event triggering).

This commit is contained in:
John Resig 2007-09-14 23:58:51 +00:00
parent 41590d37e1
commit 82eccdfcd0

View file

@ -155,6 +155,9 @@ jQuery.event = {
if ( evt ) if ( evt )
data.unshift( this.fix({ type: type, target: element }) ); data.unshift( this.fix({ type: type, target: element }) );
// Enforce the right trigger type
data[0].type = type;
// Trigger the event // Trigger the event
if ( jQuery.isFunction( jQuery.data(element, "handle") ) ) if ( jQuery.isFunction( jQuery.data(element, "handle") ) )
val = jQuery.data(element, "handle").apply( element, data ); val = jQuery.data(element, "handle").apply( element, data );