Event: add support comment

(cherry-picked from 9db9316609)

Ref gh-2047
This commit is contained in:
Oleg Gaidarenko 2015-05-02 20:51:03 +03:00
parent 1a067a49d1
commit 0fc5bebb63

View File

@ -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 );
} }