From 57cc41b2cfb412898bbdc1b676740419611788b0 Mon Sep 17 00:00:00 2001 From: Philipinho <16838612+Philipinho@users.noreply.github.com> Date: Fri, 16 May 2025 11:58:55 -0700 Subject: [PATCH] capture Mac command key * remove tooltip --- .../src/features/comment/components/comment-actions.tsx | 8 +++----- .../src/features/comment/components/comment-editor.tsx | 6 +++--- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/apps/client/src/features/comment/components/comment-actions.tsx b/apps/client/src/features/comment/components/comment-actions.tsx index 4b545f54..882c6f74 100644 --- a/apps/client/src/features/comment/components/comment-actions.tsx +++ b/apps/client/src/features/comment/components/comment-actions.tsx @@ -24,11 +24,9 @@ function CommentActions({ )} - - - + ); } diff --git a/apps/client/src/features/comment/components/comment-editor.tsx b/apps/client/src/features/comment/components/comment-editor.tsx index 7b003338..f5751a19 100644 --- a/apps/client/src/features/comment/components/comment-editor.tsx +++ b/apps/client/src/features/comment/components/comment-editor.tsx @@ -29,7 +29,7 @@ const CommentEditor = forwardRef( placeholder, autofocus, }: CommentEditorProps, - ref + ref, ) => { const { t } = useTranslation(); const { ref: focusRef, focused } = useFocusWithin(); @@ -65,7 +65,7 @@ const CommentEditor = forwardRef( } } - if (event.ctrlKey && event.key === 'Enter') { + if ((event.ctrlKey || event.metaKey) && event.key === "Enter") { event.preventDefault(); if (onSave) onSave(); @@ -106,7 +106,7 @@ const CommentEditor = forwardRef( /> ); - } + }, ); export default CommentEditor;