ulysses/static
3ASiC 521848da75
fix(ui): don't submit chat message on Enter during IME composition (#1091)
CJK and other IME users confirm a candidate from the input-method popup by pressing Enter. The chat composer and the in-place message editor each bind a keydown handler that treats Enter (without Shift) as "submit", but they did not exclude the composition state. Pressing Enter to accept an IME candidate therefore sent the half-composed text (e.g. a stray "ce's") instead of just confirming the candidate.

These textareas intentionally hijack Enter to submit (Enter sends, Shift+Enter inserts a newline), which bypasses the browser's native form submission and the IME guard that comes with it, so the guard has to be re-added explicitly.

Add '&& !e.isComposing' to the three Enter-to-submit handlers: static/app.js (the main composer's button-submit path and its send/new-chat path) and static/js/chat.js (the editor for an already-sent message). Normal Enter (isComposing false) still submits; Shift+Enter still inserts a newline.

Tested: node --check on both files; manually verified with a Chinese IME that pressing Enter to pick a candidate no longer sends, and a message is sent only after composition ends.
2026-06-02 22:32:50 +09:00
..
fonts Odysseus v1.0 2026-05-31 23:58:26 +09:00
js fix(ui): don't submit chat message on Enter during IME composition (#1091) 2026-06-02 22:32:50 +09:00
lib Odysseus v1.0 2026-05-31 23:58:26 +09:00
app.js fix(ui): don't submit chat message on Enter during IME composition (#1091) 2026-06-02 22:32:50 +09:00
index.html Models: add Z.AI coding endpoint and GLM vision detection 2026-06-02 20:59:17 +09:00
landing.html feat: Add mobile hamburger navigation menu and toggle functionality 2026-06-01 15:57:01 +04:00
login.html Improve accessibility across core flows (#86) 2026-06-01 22:04:00 +02:00
manifest.json Odysseus v1.0 2026-05-31 23:58:26 +09:00
style.css Model picker: group models by provider 2026-06-02 13:14:22 +09:00
sw.js Odysseus v1.0 2026-05-31 23:58:26 +09:00