diff --git a/src/components/PostDetail.tsx b/src/components/PostDetail.tsx index df8d79d..3bc67be 100644 --- a/src/components/PostDetail.tsx +++ b/src/components/PostDetail.tsx @@ -105,7 +105,9 @@ const PostDetail = () => { // Handle keyboard shortcuts const handleKeyDown = (e: React.KeyboardEvent) => { - if ((e.ctrlKey || e.metaKey) && e.key === 'Enter') { + // Enter inserts newline by default. Send on Ctrl+Enter or Shift+Enter. + const isSendCombo = (e.ctrlKey || e.metaKey || e.shiftKey) && e.key === 'Enter'; + if (isSendCombo) { e.preventDefault(); if (!isCreatingComment && newComment.trim()) { handleCreateComment(e as React.FormEvent); @@ -287,6 +289,10 @@ const PostDetail = () => { initialHeight={140} maxHeight={600} /> +