mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-20 02:10:15 +01:00
🔧 fix(useTextArea): Incorrect New Line while Composing Japanese Text (#3103)
This commit is contained in:
parent
54b1095239
commit
3172381bad
1 changed files with 7 additions and 1 deletions
|
|
@ -182,7 +182,13 @@ export default function useTextarea({
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.key === 'Enter' && !enterToSend && !isCtrlEnter && textAreaRef.current) {
|
if (
|
||||||
|
e.key === 'Enter' &&
|
||||||
|
!enterToSend &&
|
||||||
|
!isCtrlEnter &&
|
||||||
|
textAreaRef.current &&
|
||||||
|
!isComposing?.current
|
||||||
|
) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
insertTextAtCursor(textAreaRef.current, '\n');
|
insertTextAtCursor(textAreaRef.current, '\n');
|
||||||
forceResize(textAreaRef.current);
|
forceResize(textAreaRef.current);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue