mirror of
https://github.com/Jermolene/TiddlyWiki5.git
synced 2026-01-23 04:51:55 -08:00
Use correct calling context for actions
This commit is contained in:
parent
4fb33a0e84
commit
8f909c19b3
1 changed files with 4 additions and 1 deletions
|
|
@ -90,7 +90,10 @@ NavigatorWidget.prototype.refresh = function(changedTiddlers) {
|
|||
var delay = parseInt(this.wiki.getTiddlerText("$:/config/AnimationDuration","0"),10) || 0;
|
||||
setTimeout(function() {
|
||||
actionsToExecute.forEach(function(item) {
|
||||
self.invokeActionString(item.actions, self, item.event, item.variables);
|
||||
// We invoke the actions on the widget that sent the tm-navigate message
|
||||
// This ensures proper variable evaluation and message propagation
|
||||
var contextWidget = item.event.navigateFromNode || item.event.widget || self;
|
||||
contextWidget.invokeActionString(item.actions, contextWidget, item.event, item.variables);
|
||||
});
|
||||
}, delay);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue