aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Methvin <dave.methvin@gmail.com>2011-04-12 18:46:21 -0400
committerDave Methvin <dave.methvin@gmail.com>2011-04-12 18:46:21 -0400
commit6d49e84dafd8990221913944727e4f5dcaec078d (patch)
treedea1a8c33193ecfa04d7b655b07887cc100e9081
parent0d8b247cab2f91e118d0b734028ce827e09a71f7 (diff)
parent9e71ad1b120e2b20c7430c017629877ba277f667 (diff)
downloadjquery-6d49e84dafd8990221913944727e4f5dcaec078d.tar.gz
jquery-6d49e84dafd8990221913944727e4f5dcaec078d.zip
Merge branch 'fix-8790-quick-trigger'
Conflicts: src/event.js
-rw-r--r--src/event.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/event.js b/src/event.js
index 316a7fee1..f005f7285 100644
--- a/src/event.js
+++ b/src/event.js
@@ -275,7 +275,7 @@ jQuery.event = {
"changeData": true
},
- trigger: function( event, data, elem, bubbling /* For Internal Use Only */ ) {
+ trigger: function( event, data, elem ) {
// Event object or event type
var type = event.type || event,
namespaces = [],
@@ -304,10 +304,11 @@ jQuery.event = {
// jQuery.Event object
event[ jQuery.expando ] ? event :
// Object literal
- jQuery.extend( jQuery.Event(type), event ) :
+ jQuery.extend( new jQuery.Event(type), event ) :
// Just the event type (string)
- jQuery.Event(type);
+ new jQuery.Event(type);
+ event.type = type;
event.namespace = namespaces.join(".");
event.namespace_re = new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)");
event.exclusive = exclusive;
@@ -980,7 +981,7 @@ jQuery.fn.extend({
triggerHandler: function( type, data ) {
if ( this[0] ) {
- var event = jQuery.Event( type );
+ var event = new jQuery.Event( type );
event.preventDefault();
event.stopPropagation();
jQuery.event.trigger( event, data, this[0] );