chatwoot/app/javascript/dashboard/components/widgets
Aakash Bakhle b103747584
fix: skip Enter key submission during IME composition in AI inputs (#13779)
# Pull Request Template

## Description

CJK language users (Chinese, Japanese, Korean, etc.) use IME where Enter
confirms character selection. AI input components were intercepting
Enter unconditionally, making them unusable for IME users.

Add `event.isComposing` check to CopilotEditor, CopilotInput, and
AssistantPlayground so Enter during active IME composition is ignored.


## Type of change

Please delete options that are not relevant.

- [x] Bug fix (non-breaking change which fixes an issue)

## How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. Please also list any relevant details
for your test configuration.

Before:

Add a Japenese keyboard, then go to AI follow-ups, type some word,
selecting it with enter submits the follow up. So CJK users cannot use
follow-ups.



https://github.com/user-attachments/assets/53517432-d97b-47fc-a802-81675e31d5c9



After:

Type a word, press enter to choose it, press enter again to unselect it
and enter again to send


https://github.com/user-attachments/assets/6c2a420b-7ee6-4c71-82a6-d9f1d7bbf31a



## Checklist:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my code
- [x] I have commented on my code, particularly in hard-to-understand
areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [x] Any dependent changes have been merged and published in downstream
modules

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 10:26:51 +05:30
..
conversation chore: Hide reply-to when copilot is active (#13749) 2026-03-11 11:30:30 +05:30
DashboardApp fix: Use addEventListener instead of onmessage to listen to chatwoot-dashboard-app:fetch-info (#10342) 2024-10-28 20:43:47 -07:00
FilterInput chore: Remove vue-multiselect and migrate to next components (#13506) 2026-02-17 16:40:12 +05:30
forms feat(V5): Update settings pages UI (#13396) 2026-02-19 15:04:40 +05:30
mentions chore: Replace plain editor with advanced editor (#13071) 2026-01-08 15:17:54 +05:30
modal fix: Inbox delete confirmation fails due to whitespace (#12498) 2025-09-23 22:20:43 +05:30
WootWriter fix: skip Enter key submission during IME composition in AI inputs (#13779) 2026-03-13 10:26:51 +05:30
AILoader.vue chore: Remove older UI (#11720) 2025-07-01 09:43:44 +05:30
AttachmentsPreview.vue feat: new Captain Editor (#13235) 2026-01-21 13:39:07 +05:30
AutomationActionInput.vue chore: Remove vue-multiselect and migrate to next components (#13506) 2026-02-17 16:40:12 +05:30
AutomationActionTeamMessageInput.vue chore: Remove vue-multiselect and migrate to next components (#13506) 2026-02-17 16:40:12 +05:30
AutomationFileInput.vue chore: Remove vue-multiselect and migrate to next components (#13506) 2026-02-17 16:40:12 +05:30
BackButton.vue chore: Update buttons in integrations page (#11120) 2025-03-20 21:15:47 +05:30
ChannelItem.vue feat: TikTok channel (#12741) 2025-12-17 07:54:50 -08:00
ChatTypeTabs.vue chore: Update theme colors and add new Inter variable fonts (#13347) 2026-01-28 14:36:04 -08:00
ColorPicker.vue chore: Remove older UI (#11720) 2025-07-01 09:43:44 +05:30
EmptyState.vue chore: Remove older UI (#11720) 2025-07-01 09:43:44 +05:30
FeatureToggle.vue style: apply fixes for eslint issues [cw-3590] (#10210) 2024-10-03 15:02:12 +05:30
FloatingCallWidget.vue feat: Voice Channel (#11602) 2025-12-19 12:41:33 -08:00
InboxName.vue feat(V5): Update settings pages UI (#13396) 2026-02-19 15:04:40 +05:30
LoadingState.vue feat(V5): Update settings pages UI (#13396) 2026-02-19 15:04:40 +05:30
SettingIntroBanner.vue feat(V5): Update settings pages UI (#13396) 2026-02-19 15:04:40 +05:30
ShowMore.vue feat(ee): Review Notes for CSAT Reports (#13289) 2026-01-15 19:53:57 -08:00
TableFooter.vue style: apply fixes for eslint issues [cw-3590] (#10210) 2024-10-03 15:02:12 +05:30
TableFooterPagination.vue chore: Update buttons in dashboard (#11145) 2025-03-31 17:21:32 -07:00
TableFooterResults.vue chore: Remove older UI (#11720) 2025-07-01 09:43:44 +05:30
TableHeaderCell.vue feat: Update design for report pages (#10506) 2024-11-27 18:10:15 +08:00
ThumbnailGroup.vue chore: Replace Thumbnail with Avatar (#12119) 2025-08-11 15:47:17 +05:30
UserAvatarWithName.vue chore: Replace Thumbnail with Avatar (#12119) 2025-08-11 15:47:17 +05:30
VideoCallButton.vue chore: Update reply editor design (#10575) 2025-01-08 17:49:53 +05:30