Commit 64bb0c41 authored by Richard Gibson's avatar Richard Gibson

Ref 8f72967e: use acceptData to determine when it is safe to add event handlers

(cherry picked from commit 50290b8f)
parent 8f72967e
...@@ -25,9 +25,9 @@ jQuery.event = { ...@@ -25,9 +25,9 @@ jQuery.event = {
var handleObjIn, eventHandle, tmp, var handleObjIn, eventHandle, tmp,
events, t, handleObj, events, t, handleObj,
special, handlers, type, namespaces, origType, special, handlers, type, namespaces, origType,
// Don't attach events to noData or text/comment nodes (but allow plain objects) elemData = jQuery._data( elem );
elemData = elem.nodeType !== 3 && elem.nodeType !== 8 && jQuery._data( elem );
// Don't attach events to noData or text/comment nodes (but allow plain objects)
if ( !elemData ) { if ( !elemData ) {
return; return;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment