Make sure that the right event type is always triggered (was causing problems with...
authorJohn Resig <jeresig@gmail.com>
Fri, 14 Sep 2007 23:58:51 +0000 (23:58 +0000)
committerJohn Resig <jeresig@gmail.com>
Fri, 14 Sep 2007 23:58:51 +0000 (23:58 +0000)
src/event.js

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