From 1cb5716d69a872eebf98d95246a6c73350e17ffc Mon Sep 17 00:00:00 2001 From: "jeremy@jermolene.com" Date: Wed, 26 Apr 2023 17:51:18 +0100 Subject: [PATCH] Flickr macros: fix pagination after first page Make sure that the widget we create to run the actions also has access to the event handlers attached to the rootwidget. --- core/modules/utils/dom/http.js | 4 ++-- core/modules/wiki.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/modules/utils/dom/http.js b/core/modules/utils/dom/http.js index d4754bd01..e4432ea19 100644 --- a/core/modules/utils/dom/http.js +++ b/core/modules/utils/dom/http.js @@ -108,7 +108,7 @@ HttpClient.prototype.handleHttpRequest = function(event) { wiki.addTiddler(new $tw.Tiddler(wiki.getTiddler(requestTrackerTitle),{ status: success, })); - wiki.invokeActionString(completionActions,undefined,$tw.utils.extend({},contextVariables,results)); + wiki.invokeActionString(completionActions,undefined,$tw.utils.extend({},contextVariables,results),{parentWidget: $tw.rootWidget}); // console.log("Back!",err,data,xhr); }, progress: function(lengthComputable,loaded,total) { @@ -119,7 +119,7 @@ HttpClient.prototype.handleHttpRequest = function(event) { lengthComputable: lengthComputable ? "yes" : "no", loaded: loaded, total: total - }); + },{parentWidget: $tw.rootWidget}); } }); } diff --git a/core/modules/wiki.js b/core/modules/wiki.js index 1a08c3980..85cacaa32 100755 --- a/core/modules/wiki.js +++ b/core/modules/wiki.js @@ -1418,8 +1418,8 @@ exports.checkTiddlerText = function(title,targetText,options) { /* Execute an action string without an associated context widget */ -exports.invokeActionString = function(actions,event,variables) { - var widget = this.makeWidget(null,{}); +exports.invokeActionString = function(actions,event,variables,options) { + var widget = this.makeWidget(null,{parentWidget: options.parentWidget}); widget.invokeActionString(actions,null,event,variables); };