diff --git a/rsconcept/frontend/src/pages/RSFormPage/EditorTermGraph/EditorTermGraph.tsx b/rsconcept/frontend/src/pages/RSFormPage/EditorTermGraph/EditorTermGraph.tsx index 6b025cff..34ac3e1e 100644 --- a/rsconcept/frontend/src/pages/RSFormPage/EditorTermGraph/EditorTermGraph.tsx +++ b/rsconcept/frontend/src/pages/RSFormPage/EditorTermGraph/EditorTermGraph.tsx @@ -177,17 +177,22 @@ function EditorTermGraph({ onOpenEdit }: EditorTermGraphProps) { function handleKeyDown(event: React.KeyboardEvent) { // Hotkeys implementation - if (!controller.isContentEditable || controller.isProcessing) { + if (controller.isProcessing) { return; } - if (event.key === 'Delete') { - event.preventDefault(); - handleDeleteCst(); - } if (event.key === 'Escape') { event.preventDefault(); setFocusCst(undefined); controller.deselectAll(); + return; + } + if (!controller.isContentEditable) { + return; + } + if (event.key === 'Delete') { + event.preventDefault(); + handleDeleteCst(); + return; } }