From 1c87c85119c2e9907137102f624b5d07101c84bb Mon Sep 17 00:00:00 2001 From: yaisog Date: Tue, 25 Mar 2025 17:21:14 +0100 Subject: [PATCH] Move collectDOMVariables() into actions --- core/modules/widgets/eventcatcher.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/core/modules/widgets/eventcatcher.js b/core/modules/widgets/eventcatcher.js index 70dc99202..868ee565f 100644 --- a/core/modules/widgets/eventcatcher.js +++ b/core/modules/widgets/eventcatcher.js @@ -67,13 +67,11 @@ EventWidget.prototype.render = function(parent,nextSibling) { if(selectedNode === domNode) { return false; } - // Only set up variables if we have actions to invoke - if(actions) { - variables = $tw.utils.collectDOMVariables(selectedNode,self.domNode,event); - } } // Execute our actions with the variables if(actions) { + // Set up DOM variables + variables = $tw.utils.collectDOMVariables(selectedNode,self.domNode,event); // Add a variable for the modifier key variables.modifier = $tw.keyboardManager.getEventModifierKeyDescriptor(event); // Add a variable for the mouse button