Merge remote-tracking branch 'upstream/dev' into fix/models

This commit is contained in:
Anish Sarkar 2026-06-30 23:09:26 +05:30
commit 281b66f16f
7 changed files with 19 additions and 152 deletions

View file

@ -696,7 +696,9 @@ export const InlineMentionEditor = forwardRef<InlineMentionEditorRef, InlineMent
onKeyDown?.(e);
if (e.defaultPrevented) return;
if (e.key === "Enter" && !e.shiftKey) {
// Ignore Enter while an IME composition is active (e.g. confirming a
// Japanese/Chinese/Korean conversion) so it doesn't submit the message.
if (e.key === "Enter" && !e.shiftKey && !e.nativeEvent.isComposing) {
e.preventDefault();
onSubmit?.();
return;

View file

@ -713,6 +713,10 @@ const Composer: FC = () => {
// Arrow / Enter / Escape navigation for the active picker.
const handleKeyDown = useCallback(
(e: React.KeyboardEvent) => {
// While an IME composition is active (e.g. confirming a Japanese/Chinese/
// Korean conversion), let the Enter/Arrow keys reach the IME instead of
// driving picker navigation/selection.
if (e.nativeEvent.isComposing) return;
if (showPromptPicker) {
if (e.key === "ArrowDown") {
e.preventDefault();

View file

@ -99,7 +99,9 @@ export const FreeComposer: FC = () => {
gate("mention documents");
return;
}
if (e.key === "Enter" && !e.shiftKey) {
// Ignore Enter while an IME composition is active (e.g. confirming a
// Japanese/Chinese/Korean conversion) so it doesn't submit the message.
if (e.key === "Enter" && !e.shiftKey && !e.nativeEvent.isComposing) {
e.preventDefault();
if (text.trim()) {
aui.composer().send();