mirror of
https://github.com/langflow-ai/langflow.git
synced 2026-07-25 14:43:37 +08:00
fix: allow spacebar in chat input textarea (#12612)
fix: allow spacebar in chat input textarea
This commit is contained in:
@ -68,6 +68,11 @@ const InputWrapper = ({
|
||||
};
|
||||
|
||||
const onKeyDown = (e: React.KeyboardEvent<HTMLDivElement>) => {
|
||||
const target = e.target as HTMLElement;
|
||||
// Don't handle keyboard events that originate from the textarea
|
||||
if (target.closest("textarea")) {
|
||||
return;
|
||||
}
|
||||
if (e.key !== "Enter" && e.key !== " ") {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user