From 373f8a408383ce98c40298856ba49dcb255a535a Mon Sep 17 00:00:00 2001 From: Commander-lol <ljcapitanio@gmail.com> Date: Sun, 2 Nov 2014 22:05:50 +0000 Subject: [PATCH] Limited delegate event checking to root element specified by mu instead of bubbling to document root --- js/tinyDOM.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/tinyDOM.js b/js/tinyDOM.js index d5d118a..3a0f70d 100644 --- a/js/tinyDOM.js +++ b/js/tinyDOM.js @@ -84,7 +84,7 @@ matched = true; } else { target = target.parentNode; - if(!target || !target.matches){ + if(!target || !target.matches || target === e){ matched = true; } } -- GitLab