Skip to content

Fix: Prevent form submission during IME composition#3942

Merged
SamyPesse merged 9 commits intoGitbookIO:mainfrom
MH4GF:fix/ime-composition-enter-key
Jan 29, 2026
Merged

Fix: Prevent form submission during IME composition#3942
SamyPesse merged 9 commits intoGitbookIO:mainfrom
MH4GF:fix/ime-composition-enter-key

Conversation

@MH4GF
Copy link
Contributor

@MH4GF MH4GF commented Jan 27, 2026

Summary

Add isComposing check to prevent Enter key from submitting form while IME (Input Method Editor) is active.

This fixes the issue where Japanese/Chinese/Korean users had messages sent during character composition instead of confirming the input.

https://gitbook.com/docs localhost:3000
CleanShot.2026-01-27.at.14.57.36.mp4
CleanShot.2026-01-27.at.14.58.27.mp4

Test Results

  • Japanese IME: Type text, press Enter during composition → converts only, NOT sent
  • Press Enter after composition confirmed → message is sent
  • Shift+Enter → new line added
  • bun typecheck passes
  • bun unit passes (174 tests)

Closes #3941

Add isComposing check to prevent Enter key from submitting form
while IME (Input Method Editor) is active. This fixes the issue
where Japanese/Chinese/Korean users had messages sent during
character composition instead of confirming the input.

Closes GitbookIO#3941

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@changeset-bot
Copy link

changeset-bot bot commented Jan 27, 2026

🦋 Changeset detected

Latest commit: d44fc31

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
gitbook Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@MH4GF MH4GF marked this pull request as ready for review January 27, 2026 05:59
Copy link
Contributor

@addisonschultz addisonschultz left a comment

Choose a reason for hiding this comment

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

Tested and working well, ありがとう!

@addisonschultz
Copy link
Contributor

@MH4GF Can you please update your branch, and commit the lock file as well?

bun install
git add bun.lockb
git commit -m "Fix: update lockfile to resolve CI install failure"
git push

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@MH4GF
Copy link
Contributor Author

MH4GF commented Jan 27, 2026

@addisonschultz Thanks for the quick review! 0c37c99 I updated bun.lock with this commit, and bb763b5 I fixed the format error with this commit.
CI is still falling, but I think it's due to missing permissions on the icon package.

@SamyPesse
Copy link
Member

@MH4GF We just pushed a change to fix development/contributions from non-GitBook team members; can you update from main and revert your changes to the bun.lock?
Then we should be able to approve it and merge :)

Add @gitbook/fontawesome-pro package resolution from upstream changes.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@MH4GF
Copy link
Contributor Author

MH4GF commented Jan 28, 2026

Hi @SamyPesse, thanks for the adjustment😄 The diff in bun.lock is gone. Please check it out!

@MH4GF
Copy link
Contributor Author

MH4GF commented Jan 29, 2026

@SamyPesse By the way, let me know if I need to add a changeset!

@argos-ci
Copy link

argos-ci bot commented Jan 29, 2026

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
customers-v2 (Inspect) ✅ No changes detected - Jan 29, 2026, 12:27 PM
v2-cloudflare (Inspect) 👍 Changes approved 21 changed Jan 29, 2026, 12:32 PM
v2-vercel (Inspect) 👍 Changes approved 24 changed Jan 29, 2026, 12:32 PM

Copy link
Member

@SamyPesse SamyPesse left a comment

Choose a reason for hiding this comment

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

@MH4GF yes please add a changeset by running bun run changeset.

I pushed to your branch to fix our CI so that external PRs can now deploy after approval.

@MH4GF MH4GF deployed to preview-approval January 29, 2026 12:14 — with GitHub Actions Active
@MH4GF
Copy link
Contributor Author

MH4GF commented Jan 29, 2026

@SamyPesse I added it! d44fc31

It's cool that the CI/CD is all working even with external contributors, thanks for fixing it so quickly!

@SamyPesse SamyPesse enabled auto-merge (squash) January 29, 2026 12:46
@SamyPesse SamyPesse merged commit d738e11 into GitbookIO:main Jan 29, 2026
16 of 17 checks passed
@MH4GF
Copy link
Contributor Author

MH4GF commented Jan 30, 2026

@SamyPesse

Thanks to GitBook's AI Assistant, we've been able to reduce inquiries by 30% and also update quickly with the AI coding agent. Thank you! We'll continue to use it!
https://zenn.dev/immedio/articles/9ed901c1790d8e (Japanese)

@addisonschultz
Copy link
Contributor

@MH4GF Thank you for sending us this article! It is very nice to read how GitBook has helped immedio improve support questions from the AI agent 😄

I would love to know more about how GitBook has helped you and your team - would you mind to email me at addison@gitbook.com so I could ask a few more questions?

私も東京に住んでいます 😄

@MH4GF
Copy link
Contributor Author

MH4GF commented Jan 31, 2026

@addisonschultz Great, I sent an email 👍🏻

@MH4GF MH4GF deleted the fix/ime-composition-enter-key branch January 31, 2026 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AI Chat submits on Enter key during IME composition (Japanese/Chinese/Korean input)

3 participants