From 93a6ee52555a7c9557d926c46f06c7949bd971a8 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 26 Oct 2026 10:30:17 -0700 Subject: On a phone, Return in the reply box is a new line; Reply is the button. A hardware keyboard's Enter still sends Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01QjVvE4YAcK3AGwV7kZXeN4 --- src/features/messages.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/features') diff --git a/src/features/messages.js b/src/features/messages.js index d03c657..8481bcd 100644 --- a/src/features/messages.js +++ b/src/features/messages.js @@ -12535,7 +12535,9 @@ export function messagesFeature(ctx) { onKeydown: (e) => { mentionKey(e); if (e.defaultPrevented) return; - if (e.key === 'Enter' && !e.shiftKey) { e.preventDefault(); e.target.closest('.col').querySelector('.thread-reply-send')?.click(); return; } + // a phone's Return is a new line (Reply is the button); a + // keyboard's Enter sends + if (e.key === 'Enter' && !e.shiftKey && !matchMedia('(pointer: coarse)').matches) { e.preventDefault(); e.target.closest('.col').querySelector('.thread-reply-send')?.click(); return; } if (e.ctrlKey && (e.key === 'j' || e.key === 'J')) { e.preventDefault(); const el = e.target; -- cgit v1.2.3