From 64faf93a111d55db22cd5fc81b6765bbbe371211 Mon Sep 17 00:00:00 2001 From: Zephrynis Date: Wed, 6 Aug 2025 23:59:50 +0100 Subject: [PATCH] Show modal on Ctrl+Enter for new action in Editor Added logic to display the modal when Ctrl+Enter is pressed and the current action is 'new', improving the user workflow for creating new items. --- components/Editor.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/Editor.tsx b/components/Editor.tsx index b2597c7..61d0a8d 100644 --- a/components/Editor.tsx +++ b/components/Editor.tsx @@ -364,6 +364,8 @@ const Editor = () => { event.preventDefault(); if (action === 'edit') { save(); + } else if (action === 'new') { + setModalVisible(true); } } };