From 90e6d3384c8a68aa4fac92ef37949c30a7182625 Mon Sep 17 00:00:00 2001 From: Alex Grozav Date: Fri, 4 Oct 2024 11:14:15 +0300 Subject: [PATCH] fix(editor): Fix condition for allowing keyboard shortcuts and pasting on new canvas (no-changelog) (#11082) --- packages/editor-ui/src/views/NodeView.v2.vue | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/editor-ui/src/views/NodeView.v2.vue b/packages/editor-ui/src/views/NodeView.v2.vue index 55048ab9fb..be23b5c794 100644 --- a/packages/editor-ui/src/views/NodeView.v2.vue +++ b/packages/editor-ui/src/views/NodeView.v2.vue @@ -242,7 +242,7 @@ const fallbackNodes = computed(() => ); const keyBindingsEnabled = computed(() => { - return !ndvStore.activeNode; + return !ndvStore.activeNode && uiStore.activeModals.length === 0; }); /** @@ -551,11 +551,11 @@ async function onCopyNodes(ids: string[]) { } async function onClipboardPaste(plainTextData: string): Promise { - if (getNodeViewTab(route) !== MAIN_HEADER_TABS.WORKFLOW) { - return; - } - - if (!checkIfEditingIsAllowed()) { + if ( + getNodeViewTab(route) !== MAIN_HEADER_TABS.WORKFLOW || + !keyBindingsEnabled.value || + !checkIfEditingIsAllowed() + ) { return; }