From 64bb0c4135aab74fd5958175deec89b18bb2256a Mon Sep 17 00:00:00 2001 From: Richard Gibson Date: Wed, 16 Jan 2013 14:36:24 -0500 Subject: [PATCH] Ref 8f72967e: use acceptData to determine when it is safe to add event handlers (cherry picked from commit 50290b8ffb05c504d3866a619f282bf795bc01f6) --- src/event.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/event.js b/src/event.js index 6554769ba..5841aff7c 100644 --- a/src/event.js +++ b/src/event.js @@ -25,9 +25,9 @@ jQuery.event = { var handleObjIn, eventHandle, tmp, events, t, handleObj, special, handlers, type, namespaces, origType, - // Don't attach events to noData or text/comment nodes (but allow plain objects) - elemData = elem.nodeType !== 3 && elem.nodeType !== 8 && jQuery._data( elem ); + elemData = jQuery._data( elem ); + // Don't attach events to noData or text/comment nodes (but allow plain objects) if ( !elemData ) { return; } -- 2.39.5