mirror of
https://github.com/docmost/docmost.git
synced 2025-11-14 20:11:10 +10:00
capture Mac command key
* remove tooltip
This commit is contained in:
@ -24,11 +24,9 @@ function CommentActions({
|
|||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<Tooltip label={t("Ctrl + Enter")}>
|
<Button size="compact-sm" loading={isLoading} onClick={onSave}>
|
||||||
<Button size="compact-sm" loading={isLoading} onClick={onSave}>
|
{t("Save")}
|
||||||
{t("Save")}
|
</Button>
|
||||||
</Button>
|
|
||||||
</Tooltip>
|
|
||||||
</Group>
|
</Group>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -29,7 +29,7 @@ const CommentEditor = forwardRef(
|
|||||||
placeholder,
|
placeholder,
|
||||||
autofocus,
|
autofocus,
|
||||||
}: CommentEditorProps,
|
}: CommentEditorProps,
|
||||||
ref
|
ref,
|
||||||
) => {
|
) => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const { ref: focusRef, focused } = useFocusWithin();
|
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();
|
event.preventDefault();
|
||||||
if (onSave) onSave();
|
if (onSave) onSave();
|
||||||
|
|
||||||
@ -106,7 +106,7 @@ const CommentEditor = forwardRef(
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
export default CommentEditor;
|
export default CommentEditor;
|
||||||
|
|||||||
Reference in New Issue
Block a user