From ff50940fa67dd193d8a671dc7344d2c3da7307d5 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sun, 27 Sep 2020 09:30:24 -0700 Subject: [PATCH] Fix keyboard save shortcut when saving a new file; closes #2427 --- .../scripts/components/server/files/FileEditContainer.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/resources/scripts/components/server/files/FileEditContainer.tsx b/resources/scripts/components/server/files/FileEditContainer.tsx index 5d8102728..87eda2eb5 100644 --- a/resources/scripts/components/server/files/FileEditContainer.tsx +++ b/resources/scripts/components/server/files/FileEditContainer.tsx @@ -116,7 +116,13 @@ export default () => { fetchContent={value => { fetchFileContent = value; }} - onContentSaved={save} + onContentSaved={() => { + if (action !== 'edit') { + setModalVisible(true); + } else { + save(); + } + }} />