From 0d2fb9de0b3218343480e863dc1299cacb322f38 Mon Sep 17 00:00:00 2001 From: Antonio Anaya Date: Mon, 11 May 2026 07:06:00 -0600 Subject: [PATCH] bugfix(actionButton) Unwrap arrow function at submitOnEvent --- .../components/labThingsComponents/actionButton.vue | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/webapp/src/components/labThingsComponents/actionButton.vue b/webapp/src/components/labThingsComponents/actionButton.vue index deb2f2d2..6b173d62 100644 --- a/webapp/src/components/labThingsComponents/actionButton.vue +++ b/webapp/src/components/labThingsComponents/actionButton.vue @@ -219,22 +219,22 @@ export default { } // A global signal listener to perform the action if (this.submitOnEvent) { - eventBus.on(this.submitOnEvent, () => { - if (this.isDisabled) return; - // Bootstrap task if button is not disabled. - this.bootstrapTask(); - }); + eventBus.on(this.submitOnEvent, this.handleShortcutTrigger); } } }, beforeUnmount() { if (this.submitOnEvent) { - eventBus.off(this.submitOnEvent); + eventBus.off(this.submitOnEvent, this.handleShortcutTrigger); } }, methods: { + handleShortcutTrigger() { + if (this.isDisabled) return; + this.bootstrapTask(); + }, handleClick() { if (this.taskStarted) { this.terminateTask();