mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 15:00:57 +03:00
do not submit during IME composition
This commit is contained in:
@@ -163,7 +163,9 @@ export const ChatMessage = ({ open, chatflowid, isDialog }) => {
|
|||||||
|
|
||||||
// Prevent blank submissions and allow for multiline input
|
// Prevent blank submissions and allow for multiline input
|
||||||
const handleEnter = (e) => {
|
const handleEnter = (e) => {
|
||||||
if (e.key === 'Enter' && userInput) {
|
// Check if IME composition is in progress
|
||||||
|
const isIMEComposition = e.isComposing || e.keyCode === 229
|
||||||
|
if (e.key === 'Enter' && userInput && !isIMEComposition) {
|
||||||
if (!e.shiftKey && userInput) {
|
if (!e.shiftKey && userInput) {
|
||||||
handleSubmit(e)
|
handleSubmit(e)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user