Repository: kestra-io/kestra
Issue: [UI] CTRL-E in the flow editor no longuer launch an execution
Labels: bug

### Explain the bug

[UI] CTRL-E in the flow editor no longuer launch an execution

### Environment Information

- Kestra Version: 0.13
- Operating System and Java Version (if not using Kestra Docker image):


Issue comments:

Pull request review comments:

Patch that resolved the issue:
diff --git a/ui/src/components/flows/TriggerFlow.vue b/ui/src/components/flows/TriggerFlow.vue
index 99b504a939..02e60fc699 100644
--- a/ui/src/components/flows/TriggerFlow.vue
+++ b/ui/src/components/flows/TriggerFlow.vue
@@ -1,6 +1,6 @@
 <template>
     <div class="trigger-flow-wrapper">
-        <el-button class="edit-flow-trigger-button" :icon="icon.Flash" :disabled="disabled || flow?.deleted" :type="type" @click="onClick">
+        <el-button class="edit-flow-trigger-button" :icon="icon.Flash" :disabled="isDisabled()" :type="type" @click="onClick">
             {{ $t('execute') }}
         </el-button>
         <el-dialog v-if="isOpen" v-model="isOpen" destroy-on-close :append-to-body="true">
@@ -76,13 +76,15 @@
                 }
                 this.isOpen = !this.isOpen
             },
-
             closeModal() {
                 this.isOpen = false;
+            },
+            isDisabled() {
+                return this.disabled || this.flow?.deleted;
             }
         },
         computed: {
-            ...mapState("flow", ["flow"]),
+            ...mapState("flow", ["flow", "executeFlow"]),
             ...mapState("core", ["guidedProperties"]),
         },
         watch: {
@@ -93,6 +95,14 @@
                     }
                 },
                 deep: true
+            },
+            executeFlow: {
+                handler() {
+                    if (this.executeFlow && !this.isDisabled()) {
+                        this.$store.commit("flow/executeFlow", false);
+                        this.onClick();
+                    }
+                }
             }
         }
     };
diff --git a/ui/src/components/inputs/EditorView.vue b/ui/src/components/inputs/EditorView.vue
index 705d968b59..ff2b20668b 100644
--- a/ui/src/components/inputs/EditorView.vue
+++ b/ui/src/components/inputs/EditorView.vue
@@ -135,7 +135,6 @@
     const isLoading = ref(false);
     const haveChange = ref(false)
     const flowYaml = ref("")
-    const triggerFlowDomElement = ref(null);
     const newTrigger = ref(null)
     const isNewTriggerOpen = ref(false)
     const newError = ref(null)
@@ -547,10 +546,7 @@
     };
 
     const execute = (_) => {
-        if (!triggerFlowDomElement.value) {
-            return;
-        }
-        triggerFlowDomElement.value.onClick();
+        store.commit("flow/executeFlow", true);
     };
 
     const canDelete = () => {
diff --git a/ui/src/stores/flow.js b/ui/src/stores/flow.js
index 6cab48c209..102e9d5051 100644
--- a/ui/src/stores/flow.js
+++ b/ui/src/stores/flow.js
@@ -25,7 +25,8 @@ export default {
         taskError: undefined,
         metrics: [],
         aggregatedMetrics: undefined,
-        tasksWithMetrics: []
+        tasksWithMetrics: [],
+        executeFlow: false
     },
 
     actions: {
@@ -334,6 +335,9 @@ export default {
 
             state.flow = {...flow}
         },
+        executeFlow(state, value) {
+            state.executeFlow = value;
+        },
         addTrigger(state, trigger) {
             let flow = state.flow;
 


Test patch: