[Pkg-javascript-commits] [dojo] 18/19: Fix #18254
David Prévot
taffit at moszumanska.debian.org
Sun Sep 14 16:23:09 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag 1.8.7
in repository dojo.
commit 0d4fc05e2fde14516581f6dd29f411d550377d02
Author: Colin Snover <github.com at zetafleet.com>
Date: Sat Sep 6 01:16:58 2014 +0000
Fix #18254
(cherry picked from commit e4296a68b2eee9420ea21beb5b3fb7c1f6e9a8f6)
---
on.js | 4 +++-
tests/on/on.js | 9 +++++++++
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/on.js b/on.js
index 9fcef2f..6781918 100644
--- a/on.js
+++ b/on.js
@@ -222,7 +222,9 @@ define(["./has!dom-addeventlistener?:./aspect", "./_base/kernel", "./has"], func
// call select to see if we match
var eventTarget = select(event.target);
// if it matches we call the listener
- return eventTarget && listener.call(eventTarget, event);
+ if (eventTarget) {
+ return listener.call(eventTarget, event);
+ }
});
};
};
diff --git a/tests/on/on.js b/tests/on/on.js
index bb5c031..2aae379 100644
--- a/tests/on/on.js
+++ b/tests/on/on.js
@@ -296,6 +296,15 @@ define([
});
button.click();
t.is(testValue, 3);
+ },
+ function delegatePreventDefault(t){
+ var div = document.createElement("div");
+ div.innerHTML = '<input type="checkbox">';
+ var cb = div.childNodes[0];
+ document.body.appendChild(div);
+ on(div, '.matchesNothing:click', function () {});
+ cb.click();
+ t.t(cb.checked);
}
]);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/dojo.git
More information about the Pkg-javascript-commits
mailing list