aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard Gibson <richard.gibson@gmail.com>2013-01-16 00:14:57 -0500
committerRichard Gibson <richard.gibson@gmail.com>2015-08-10 10:26:13 -0400
commit9d820fbde6d89bc7a06e2704be61cf6c0b4d6e3c (patch)
treea4c2e3f31e8185cb910538488cd2d98ee251d97d /src
parent9adfad19865837f5dffedb1eb41e407f196ca515 (diff)
downloadjquery-9d820fbde6d89bc7a06e2704be61cf6c0b4d6e3c.tar.gz
jquery-9d820fbde6d89bc7a06e2704be61cf6c0b4d6e3c.zip
Event: Only check elements for delegation matches
Closes gh-2529 Ref trac-13208 (cherry picked from commit fc2ba2e1361126c39f955437ee025cfca3bffa65)
Diffstat (limited to 'src')
-rw-r--r--src/event.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/event.js b/src/event.js
index f0604503c..156bc016a 100644
--- a/src/event.js
+++ b/src/event.js
@@ -483,8 +483,9 @@ jQuery.event = {
for ( ; cur !== this; cur = cur.parentNode || this ) {
+ // Don't check non-elements (#13208)
// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
- if ( cur.disabled !== true || event.type !== "click" ) {
+ if ( cur.nodeType === 1 && (cur.disabled !== true || event.type !== "click") ) {
matches = [];
for ( i = 0; i < delegateCount; i++ ) {
handleObj = handlers[ i ];