Prevent send on Enter when IME composing

Fixes #2398
This commit is contained in:
Cohee
2025-04-23 09:26:15 +00:00
parent 0520f3ccf4
commit 6878c79fc8

View File

@@ -1048,7 +1048,7 @@ export function initRossMods() {
//Enter to send when send_textarea in focus
if (document.activeElement == hotkeyTargets['send_textarea']) {
const sendOnEnter = shouldSendOnEnter();
if (!event.shiftKey && !event.ctrlKey && !event.altKey && event.key == 'Enter' && sendOnEnter) {
if (!event.isComposing && !event.shiftKey && !event.ctrlKey && !event.altKey && event.key == 'Enter' && sendOnEnter) {
event.preventDefault();
sendTextareaMessage();
return;