aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard Gibson <richard.gibson@gmail.com>2013-01-13 21:38:40 -0500
committerRichard Gibson <richard.gibson@gmail.com>2013-01-13 21:40:24 -0500
commit31b95797155077e4e670c0bbb2c57815f89769a1 (patch)
tree4c8835bc62b3015e00ba5b735f988971beb7c9bf /src
parentde486684e3df1988080fd41c97d5f6ab8e6171ed (diff)
downloadjquery-31b95797155077e4e670c0bbb2c57815f89769a1.tar.gz
jquery-31b95797155077e4e670c0bbb2c57815f89769a1.zip
Fix #13203: delegated events with selector matching Object.prototype property
Diffstat (limited to 'src')
-rw-r--r--src/event.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/event.js b/src/event.js
index a880bb647..0a85bf43c 100644
--- a/src/event.js
+++ b/src/event.js
@@ -403,7 +403,9 @@ jQuery.event = {
matches = [];
for ( i = 0; i < delegateCount; i++ ) {
handleObj = handlers[ i ];
- sel = handleObj.selector;
+
+ // Don't conflict with Object.prototype properties (#13203)
+ sel = handleObj.selector + " ";
if ( matches[ sel ] === undefined ) {
matches[ sel ] = handleObj.needsContext ?