capture Mac command key

* remove tooltip
This commit is contained in:
Philipinho
2025-05-16 11:58:55 -07:00
parent 9ec688f679
commit 57cc41b2cf
2 changed files with 6 additions and 8 deletions

View File

@ -24,11 +24,9 @@ function CommentActions({
</Button>
)}
<Tooltip label={t("Ctrl + Enter")}>
<Button size="compact-sm" loading={isLoading} onClick={onSave}>
{t("Save")}
</Button>
</Tooltip>
<Button size="compact-sm" loading={isLoading} onClick={onSave}>
{t("Save")}
</Button>
</Group>
);
}

View File

@ -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(
/>
</div>
);
}
},
);
export default CommentEditor;