update components
This commit is contained in:
parent
84945cabc4
commit
ab2d2eaf94
111 changed files with 4302 additions and 3100 deletions
|
@ -8,6 +8,8 @@ define( [
|
|||
"../event"
|
||||
], function( jQuery, document, dataPriv, acceptData, hasOwn ) {
|
||||
|
||||
"use strict";
|
||||
|
||||
var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/;
|
||||
|
||||
jQuery.extend( jQuery.event, {
|
||||
|
@ -121,7 +123,7 @@ jQuery.extend( jQuery.event, {
|
|||
special._default.apply( eventPath.pop(), data ) === false ) &&
|
||||
acceptData( elem ) ) {
|
||||
|
||||
// Call a native DOM method on the target with the same name name as the event.
|
||||
// Call a native DOM method on the target with the same name as the event.
|
||||
// Don't do default actions on window, that's where global variables be (#6170)
|
||||
if ( ontype && jQuery.isFunction( elem[ type ] ) && !jQuery.isWindow( elem ) ) {
|
||||
|
||||
|
@ -148,6 +150,7 @@ jQuery.extend( jQuery.event, {
|
|||
},
|
||||
|
||||
// Piggyback on a donor event to simulate a different one
|
||||
// Used only for `focus(in | out)` events
|
||||
simulate: function( type, elem, event ) {
|
||||
var e = jQuery.extend(
|
||||
new jQuery.Event(),
|
||||
|
@ -155,27 +158,10 @@ jQuery.extend( jQuery.event, {
|
|||
{
|
||||
type: type,
|
||||
isSimulated: true
|
||||
|
||||
// Previously, `originalEvent: {}` was set here, so stopPropagation call
|
||||
// would not be triggered on donor event, since in our own
|
||||
// jQuery.event.stopPropagation function we had a check for existence of
|
||||
// originalEvent.stopPropagation method, so, consequently it would be a noop.
|
||||
//
|
||||
// But now, this "simulate" function is used only for events
|
||||
// for which stopPropagation() is noop, so there is no need for that anymore.
|
||||
//
|
||||
// For the 1.x branch though, guard for "click" and "submit"
|
||||
// events is still used, but was moved to jQuery.event.stopPropagation function
|
||||
// because `originalEvent` should point to the original event for the constancy
|
||||
// with other events and for more focused logic
|
||||
}
|
||||
);
|
||||
|
||||
jQuery.event.trigger( e, null, elem );
|
||||
|
||||
if ( e.isDefaultPrevented() ) {
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
|
||||
} );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue