Skip to content

Conversation

@hanios123
Copy link

Summary

Prevent the link toolbar form from submitting when the user presses Enter during IME (Input Method Editor) composition.

Rationale

When users type in languages that require IME input methods (e.g., Japanese, Chinese, Korean), they press Enter to confirm character conversions (e.g., converting hiragana to kanji). Without this fix, pressing Enter during composition would prematurely submit the link form instead of completing the character input, breaking the editing experience for CJK users.

Changes

  • Added a check for event.nativeEvent.isComposing in the handleEnter callback within EditLinkMenuItems.tsx
  • The handler now returns early if the keyboard event is part of an ongoing IME composition session

Impact

  • No breaking changes – This only adds a guard condition
  • Improves accessibility and usability for users typing in CJK languages
  • Existing functionality for non-IME users remains unchanged

Testing

  • Manual testing: Verified with Japanese IME (macOS) that Enter key during kanji conversion no longer submits the form, and Enter after composition completes works as expected
  • Tested that normal (non-IME) Enter key behavior still submits the link correctly

Screenshots/Video

Screen.Recording.2026-01-15.at.11.03.09.mov

Checklist

  • Code follows the project's coding standards.
  • Unit tests covering the new feature have been added.
  • All existing tests pass.
  • The documentation has been updated to reflect the new feature

@vercel
Copy link

vercel bot commented Jan 15, 2026

@hanios123 is attempting to deploy a commit to the TypeCell Team on Vercel.

A member of the Team first needs to authorize it.

@nperez0111
Copy link
Contributor

This is great @hanios123 I would merge this, but I'd probably go around to check whether we have this issue in other places or not first. And I don't have the time to dive into that at this time.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 15, 2026

Open in StackBlitz

@blocknote/ariakit

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/ariakit@2361

@blocknote/code-block

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/code-block@2361

@blocknote/core

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/core@2361

@blocknote/mantine

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/mantine@2361

@blocknote/react

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/react@2361

@blocknote/server-util

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/server-util@2361

@blocknote/shadcn

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/shadcn@2361

@blocknote/xl-ai

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-ai@2361

@blocknote/xl-docx-exporter

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-docx-exporter@2361

@blocknote/xl-email-exporter

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-email-exporter@2361

@blocknote/xl-multi-column

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-multi-column@2361

@blocknote/xl-odt-exporter

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-odt-exporter@2361

@blocknote/xl-pdf-exporter

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-pdf-exporter@2361

commit: 74ead8c

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.

2 participants