mirror of
https://github.com/docmost/docmost.git
synced 2025-11-13 23:41:14 +10:00
capture Mac command key
* remove tooltip
This commit is contained in:
@ -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>
|
||||
);
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user