From f4e3255b244698a2425f8a383f2299e6a15e811c Mon Sep 17 00:00:00 2001 From: Oliver Trajceski Date: Fri, 4 Mar 2022 18:04:04 +0100 Subject: [PATCH] :bug: Fix issue that ctrl + o did behave wrong on workflow templates page (#2934) * N8N-3094 Workflow Templates cmd-o acts on the Preview/Iframe * N8N-3094 Workflow Templates cmd-o acts on the Preview/Iframe * disable shortcuts for preview Co-authored-by: Mutasem --- packages/editor-ui/src/views/NodeView.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/editor-ui/src/views/NodeView.vue b/packages/editor-ui/src/views/NodeView.vue index 0527c4777..fa7466ebc 100644 --- a/packages/editor-ui/src/views/NodeView.vue +++ b/packages/editor-ui/src/views/NodeView.vue @@ -729,12 +729,18 @@ export default mixins( // Open workflow dialog e.stopPropagation(); e.preventDefault(); + if (this.isDemo) { + return; + } this.$store.dispatch('ui/openModal', WORKFLOW_OPEN_MODAL_KEY); } else if (e.key === 'n' && this.isCtrlKeyPressed(e) === true && e.altKey === true) { // Create a new workflow e.stopPropagation(); e.preventDefault(); + if (this.isDemo) { + return; + } if (this.$router.currentRoute.name === 'NodeViewNew') { this.$root.$emit('newWorkflow');