mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-05-21 15:36:48 +00:00
fix(frontend): prevent submit during IME composition (#1562)
This commit is contained in:
@@ -34,6 +34,7 @@ import {
|
||||
SelectTrigger,
|
||||
SelectValue,
|
||||
} from "@/components/ui/select";
|
||||
import { isIMEComposing } from "@/lib/ime";
|
||||
import { cn } from "@/lib/utils";
|
||||
import type { ChatStatus, FileUIPart } from "ai";
|
||||
import {
|
||||
@@ -833,7 +834,7 @@ export const PromptInputTextarea = ({
|
||||
|
||||
const handleKeyDown: KeyboardEventHandler<HTMLTextAreaElement> = (e) => {
|
||||
if (e.key === "Enter") {
|
||||
if (isComposing || e.nativeEvent.isComposing) {
|
||||
if (isIMEComposing(e, isComposing)) {
|
||||
return;
|
||||
}
|
||||
if (e.shiftKey) {
|
||||
|
||||
Reference in New Issue
Block a user