diff options
| author | Adam Soltys <[email protected]> | 2026-10-26 10:30:17 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-10-26 10:30:17 -0700 |
| commit | 93a6ee52555a7c9557d926c46f06c7949bd971a8 (patch) | |
| tree | 343a9961c04a9850e4df680f7945373fe107921d /src | |
| parent | 5360027b5f44b75afd14741f8bb54738a1fc2be5 (diff) | |
| download | coinosv3-93a6ee52555a7c9557d926c46f06c7949bd971a8.tar.gz coinosv3-93a6ee52555a7c9557d926c46f06c7949bd971a8.zip | |
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 <[email protected]>
Claude-Session: https://claude.ai/code/session_01QjVvE4YAcK3AGwV7kZXeN4
Diffstat (limited to 'src')
| -rw-r--r-- | src/features/messages.js | 4 |
1 files changed, 3 insertions, 1 deletions
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; |
