Commit 188a206d authored by Sven Franck's avatar Sven Franck

bugfix currentTarget as fallback for events triggered on nested elements

parent 266ff545
......@@ -3830,7 +3830,7 @@
"className": "ui-btn " + (icon === null ? "" :
"ui-btn-icon-right ui-icon-" + (icon === undefined ?
"carat-r" : icon)),
"href": props.href
"href": props.href;
},
{
"title": props.title || "",
......@@ -6131,7 +6131,7 @@
*/
// TODO: clean this up
app.action = function (e) {
var type, tag, val, action, handler;
var type, tag, val, action, handler, fallback;
type = e.type;
tag = e.target.tagName;
......@@ -6153,9 +6153,10 @@
}
// map
action = e.target.getAttribute("data-action");
fallback = e.currentTarget.getAttribute("data-action");
handler = map.actions[action];
if (action) {
if (fallback || action) {
if (handler) {
handler(app.generateActionObject(e), val);
} else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment