From 0fc5bebb63decb57dfe4247ea836fbf402d92ad1 Mon Sep 17 00:00:00 2001 From: Oleg Gaidarenko Date: Sat, 2 May 2015 20:51:03 +0300 Subject: [PATCH] Event: add support comment (cherry-picked from 9db9316609c2881dbb6abc49efc3aa91a57a02ad) Ref gh-2047 --- src/event.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/event.js b/src/event.js index 87ae3a65b..a5b8d597d 100644 --- a/src/event.js +++ b/src/event.js @@ -24,6 +24,8 @@ function returnFalse() { return false; } +// Support: IE9 +// See #13393 for more info function safeActiveElement() { try { return document.activeElement; @@ -439,7 +441,10 @@ jQuery.event = { delegateCount = handlers.delegateCount, cur = event.target; + // Support (at least): Chrome, IE9 // Find delegate handlers + // + // Support: Firefox // Black-hole SVG instance trees (#13180) // Avoid non-left-click bubbling in Firefox (#3861) if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) { @@ -669,6 +674,8 @@ jQuery.event = { jQuery.removeEvent = document.removeEventListener ? function( elem, type, handle ) { + + // This "if" is needed for plain objects if ( elem.removeEventListener ) { elem.removeEventListener( type, handle, false ); }