Comment on cmd+enter too

This commit is contained in:
Austin Chen 2022-03-01 18:52:09 -08:00
parent ce30b34480
commit a3973b3481

View File

@ -136,7 +136,7 @@ function FeedBet(props: { activityItem: any; feedType: FeedType }) {
placeholder="Add a comment..."
rows={3}
onKeyDown={(e) => {
if (e.key === 'Enter' && e.ctrlKey) {
if (e.key === 'Enter' && (e.ctrlKey || e.metaKey)) {
submitComment()
}
}}
@ -181,7 +181,7 @@ function EditContract(props: {
e.target.setSelectionRange(text.length, text.length)
}
onKeyDown={(e) => {
if (e.key === 'Enter' && e.ctrlKey) {
if (e.key === 'Enter' && (e.ctrlKey || e.metaKey)) {
onSave(text)
}
}}