fix(ime): prevent form submission during IME composition steps (#2279)

* fix(ui): prevent form submission during IME composition steps

* chore(gitignore): add IntelliJ IDE files to .gitignore

---------

Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: Waleed <walif6@gmail.com>
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
This commit is contained in:
mosa
2025-12-10 12:58:33 +09:00
committed by GitHub
parent c5b3fcb181
commit 3cec449402
2 changed files with 4 additions and 1 deletions

3
.gitignore vendored
View File

@@ -67,6 +67,9 @@ start-collector.sh
# VSCode
.vscode
# IntelliJ
.idea
## Helm Chart Tests
helm/sim/test
i18n.cache

View File

@@ -391,7 +391,7 @@ const UserInput = forwardRef<UserInputRef, UserInputProps>(
if (mentionKeyboard.handleArrowLeft(e)) return
// Enter key handling
if (e.key === 'Enter' && !e.shiftKey) {
if (e.key === 'Enter' && !e.shiftKey && !e.nativeEvent.isComposing) {
e.preventDefault()
if (!mentionMenu.showMentionMenu) {
handleSubmit()