Merge branch 'fix-8790-quick-trigger'
Conflicts: src/event.js
This commit is contained in:
commit
6d49e84daf
|
@ -275,7 +275,7 @@ jQuery.event = {
|
||||||
"changeData": true
|
"changeData": true
|
||||||
},
|
},
|
||||||
|
|
||||||
trigger: function( event, data, elem, bubbling /* For Internal Use Only */ ) {
|
trigger: function( event, data, elem ) {
|
||||||
// Event object or event type
|
// Event object or event type
|
||||||
var type = event.type || event,
|
var type = event.type || event,
|
||||||
namespaces = [],
|
namespaces = [],
|
||||||
|
@ -304,10 +304,11 @@ jQuery.event = {
|
||||||
// jQuery.Event object
|
// jQuery.Event object
|
||||||
event[ jQuery.expando ] ? event :
|
event[ jQuery.expando ] ? event :
|
||||||
// Object literal
|
// Object literal
|
||||||
jQuery.extend( jQuery.Event(type), event ) :
|
jQuery.extend( new jQuery.Event(type), event ) :
|
||||||
// Just the event type (string)
|
// Just the event type (string)
|
||||||
jQuery.Event(type);
|
new jQuery.Event(type);
|
||||||
|
|
||||||
|
event.type = type;
|
||||||
event.namespace = namespaces.join(".");
|
event.namespace = namespaces.join(".");
|
||||||
event.namespace_re = new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)");
|
event.namespace_re = new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)");
|
||||||
event.exclusive = exclusive;
|
event.exclusive = exclusive;
|
||||||
|
@ -980,7 +981,7 @@ jQuery.fn.extend({
|
||||||
|
|
||||||
triggerHandler: function( type, data ) {
|
triggerHandler: function( type, data ) {
|
||||||
if ( this[0] ) {
|
if ( this[0] ) {
|
||||||
var event = jQuery.Event( type );
|
var event = new jQuery.Event( type );
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
jQuery.event.trigger( event, data, this[0] );
|
jQuery.event.trigger( event, data, this[0] );
|
||||||
|
|
Loading…
Reference in a new issue