mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Ref cc324abf
: use acceptData to determine when it is safe to add event handlers
This commit is contained in:
parent
cc324abf73
commit
50290b8ffb
@ -24,9 +24,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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user