Browse Source

fix: selection not working

Ahmad Kholid 3 years ago
parent
commit
e9d463e247

+ 4 - 3
src/background/workflow-engine/engine.js

@@ -438,14 +438,15 @@ class WorkflowEngine {
           refData: this.referenceData,
         });
 
+        if (result.replacedValue) {
+          replacedBlock.replacedValue = result.replacedValue;
+        }
+
         addBlockLog(result.status || 'success', {
           logId: result.logId,
         });
       }
 
-      if (result.replacedValue)
-        replacedBlock.replacedValue = result.replacedValue;
-
       if (result.nextBlockId) {
         setTimeout(() => {
           this.executeBlock(this.blocks[result.nextBlockId], result.data);

+ 1 - 1
src/components/newtab/workflow/WorkflowBuilder.vue

@@ -465,7 +465,7 @@ export default {
       });
 
       selection.value.on('beforestart', ({ event }) => {
-        if (!event.ctrlKey || !event.metaKey) return false;
+        if (!event.ctrlKey && !event.metaKey) return false;
 
         editor.value.editor_mode = 'fixed';
         editor.value.editor_selected = false;