mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
fix(editor): Fix condition for allowing keyboard shortcuts and pasting on new canvas (no-changelog) (#11082)
This commit is contained in:
parent
bdb9cbb396
commit
90e6d3384c
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue