diff options
author | Richard Gibson <richard.gibson@gmail.com> | 2013-01-16 14:36:24 -0500 |
---|---|---|
committer | Richard Gibson <richard.gibson@gmail.com> | 2013-01-16 14:41:18 -0500 |
commit | 64bb0c4135aab74fd5958175deec89b18bb2256a (patch) | |
tree | a845dda563d927672b790f6e013b6389bb3fa933 /src/event.js | |
parent | 8f72967ee2090d4b0d38a59b2e4743e0ce7a1b5e (diff) | |
download | jquery-64bb0c4135aab74fd5958175deec89b18bb2256a.tar.gz jquery-64bb0c4135aab74fd5958175deec89b18bb2256a.zip |
Ref 8f72967e: use acceptData to determine when it is safe to add event handlers
(cherry picked from commit 50290b8ffb05c504d3866a619f282bf795bc01f6)
Diffstat (limited to 'src/event.js')
-rw-r--r-- | src/event.js | 4 |
1 files 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; } |