mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-09-27 06:38:19 +00:00
Ensure new variables are strings (#5197)
This commit is contained in:
parent
8799911162
commit
9825b5b4a0
@ -97,13 +97,13 @@ EventWidget.prototype.render = function(parent,nextSibling) {
|
|||||||
variables["event-mousebutton"] = "right";
|
variables["event-mousebutton"] = "right";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
variables["event-type"] = event.type;
|
variables["event-type"] = event.type.toString();
|
||||||
if(typeof event.detail === "object" && !!event.detail) {
|
if(typeof event.detail === "object" && !!event.detail) {
|
||||||
$tw.utils.each(event.detail,function(detailValue,detail) {
|
$tw.utils.each(event.detail,function(detailValue,detail) {
|
||||||
variables["event-detail-" + detail] = detailValue;
|
variables["event-detail-" + detail] = detailValue.toString();
|
||||||
});
|
});
|
||||||
} else if(!!event.detail) {
|
} else if(!!event.detail) {
|
||||||
variables["event-detail"] = event.detail;
|
variables["event-detail"] = event.detail.toString();
|
||||||
}
|
}
|
||||||
self.invokeActionString(actions,self,event,variables);
|
self.invokeActionString(actions,self,event,variables);
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
@ -153,4 +153,4 @@ EventWidget.prototype.refresh = function(changedTiddlers) {
|
|||||||
|
|
||||||
exports.eventcatcher = EventWidget;
|
exports.eventcatcher = EventWidget;
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
Loading…
Reference in New Issue
Block a user