fix(editor): Fix condition for allowing keyboard shortcuts and pasting on new canvas (no-changelog) (#11082)

This commit is contained in:
Alex Grozav 2024-10-04 11:14:15 +03:00 committed by GitHub
parent bdb9cbb396
commit 90e6d3384c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -242,7 +242,7 @@ const fallbackNodes = computed<INodeUi[]>(() =>
); );
const keyBindingsEnabled = 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<void> { async function onClipboardPaste(plainTextData: string): Promise<void> {
if (getNodeViewTab(route) !== MAIN_HEADER_TABS.WORKFLOW) { if (
return; getNodeViewTab(route) !== MAIN_HEADER_TABS.WORKFLOW ||
} !keyBindingsEnabled.value ||
!checkIfEditingIsAllowed()
if (!checkIfEditingIsAllowed()) { ) {
return; return;
} }