mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
parent
1a067a49d1
commit
0fc5bebb63
@ -24,6 +24,8 @@ function returnFalse() {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Support: IE9
|
||||||
|
// See #13393 for more info
|
||||||
function safeActiveElement() {
|
function safeActiveElement() {
|
||||||
try {
|
try {
|
||||||
return document.activeElement;
|
return document.activeElement;
|
||||||
@ -439,7 +441,10 @@ jQuery.event = {
|
|||||||
delegateCount = handlers.delegateCount,
|
delegateCount = handlers.delegateCount,
|
||||||
cur = event.target;
|
cur = event.target;
|
||||||
|
|
||||||
|
// Support (at least): Chrome, IE9
|
||||||
// Find delegate handlers
|
// Find delegate handlers
|
||||||
|
//
|
||||||
|
// Support: Firefox
|
||||||
// Black-hole SVG <use> instance trees (#13180)
|
// Black-hole SVG <use> instance trees (#13180)
|
||||||
// Avoid non-left-click bubbling in Firefox (#3861)
|
// Avoid non-left-click bubbling in Firefox (#3861)
|
||||||
if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) {
|
if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) {
|
||||||
@ -669,6 +674,8 @@ jQuery.event = {
|
|||||||
|
|
||||||
jQuery.removeEvent = document.removeEventListener ?
|
jQuery.removeEvent = document.removeEventListener ?
|
||||||
function( elem, type, handle ) {
|
function( elem, type, handle ) {
|
||||||
|
|
||||||
|
// This "if" is needed for plain objects
|
||||||
if ( elem.removeEventListener ) {
|
if ( elem.removeEventListener ) {
|
||||||
elem.removeEventListener( type, handle, false );
|
elem.removeEventListener( type, handle, false );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user