Skip to content

Conversation

@B0sh
Copy link
Contributor

@B0sh B0sh commented Aug 9, 2025

Japanese or Chinese users use a IME (Input Method Editor) to type their language, where you typically use the enter key to select the characters you want. So when I went go to use Jan, as soon as I type in a single word it triggers the activation because the component is listening for "enter" key presses.

The isComposing flag returns true if the user is using one of these input tools so as not to trigger accidental input, however Safari's implementation is not working correctly, so the keyCode method is also required. See the following webkit bug:

https://bugs.webkit.org/show_bug.cgi?id=165004

Describe Your Changes

  • Added an additional check to prevent chat submissions during IME input

Self Checklist

  • [ x] Added relevant comments, esp in complex areas
  • Updated docs (for bug fixes / features)
  • Created issues for follow-up changes or refactoring needed

Important

Prevent accidental message submission in ChatInput for IME users by checking isComposing and keyCode for Safari.

  • Behavior:
    • Prevents message submission in ChatInput during IME composition by checking isComposing flag and e.keyCode === 229 for Safari.
  • Misc:
    • Added comments in ChatInput.tsx to explain the IME handling logic.

This description was created by Ellipsis for 9b8fb62. You can customize this summary. It will automatically update as commits are pushed.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Looks good to me! 👍

Reviewed everything up to 9b8fb62 in 1 minute and 12 seconds. Click for details.
  • Reviewed 15 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. web-app/src/containers/ChatInput.tsx:374
  • Draft comment:
    Good fix to prevent accidental submission during IME composition. The check using e.nativeEvent.isComposing || e.keyCode === 229 is clear and addresses Safari’s bug. Note that while keyCode is deprecated, it’s needed here as a workaround.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
2. web-app/src/containers/ChatInput.tsx:379
  • Draft comment:
    Typo: It looks like 'handleSendMesage' is misspelled. It should probably be 'handleSendMessage'.
  • Reason this comment was not posted:
    Comment was on unchanged code.

Workflow ID: wflow_rgD2lqGzEwdWIucw

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

@louis-jan louis-jan requested a review from urmauur August 10, 2025 17:02
@louis-jan louis-jan merged commit 3fc85c5 into janhq:dev Aug 11, 2025
17 checks passed
@github-project-automation github-project-automation bot moved this to QA in Jan Aug 11, 2025
@LazyYuuki LazyYuuki added this to the v0.6.8 milestone Aug 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants