Skip to content

fix: guard table rename against IME composition Enter#3462

Closed
greymoth-jp wants to merge 1 commit into
teableio:developfrom
greymoth-jp:fix/table-rename-ime-composition
Closed

fix: guard table rename against IME composition Enter#3462
greymoth-jp wants to merge 1 commit into
teableio:developfrom
greymoth-jp:fix/table-rename-ime-composition

Conversation

@greymoth-jp

Copy link
Copy Markdown

Problem

Renaming a table commits the new name on Enter. The keydown handler in TableInfo.tsx only checks e.key === 'Enter', so it also fires while an IME is composing. When you rename a table in Japanese, Chinese, or Korean, pressing Enter to confirm an IME candidate calls table.updateName() with the half composed text and closes the editor, instead of just accepting the candidate.

Why this is a leftover, not intended

The rest of the codebase already treats a composing Enter as "do nothing yet":

  • packages/sdk/src/components/grid/hooks/useKeyboardSelection.ts starts its key handler with if (keyboardEvent.isComposing) return;, so the grid never acts on a composing key.
  • The filter and search inputs gate their action on !isComposing (packages/sdk/src/components/filter/view-filter/component/base/BaseSingleSelect.tsx, packages/sdk/src/components/member-selector/SearchInput.tsx).

This single rename input is missing the same guard.

Changes

Add !e.nativeEvent.isComposing to the Enter check, matching the grid's isComposing guard.

if (e.key === 'Enter' && !e.nativeEvent.isComposing) {

Outside of IME input isComposing is always false, so this is a no op for normal typing: a plain Enter still commits the rename, and the existing onBlur commit path is untouched.

How this was tested

I did not run the full app test suite for this one line guard. I checked the logic against the three relevant keydown shapes:

  • composing Enter (key: 'Enter', isComposing: true, seen on Safari/WebKit when confirming a candidate): before this change the rename fires; after, it is skipped and composition continues.
  • plain Enter (isComposing: false): commits the rename, unchanged.
  • on Chromium the composition confirming Enter is typically reported as keyCode 229 rather than key === 'Enter', so the handler does not fire there either way and the guard is harmless.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@greymoth-jp

Copy link
Copy Markdown
Author

Closing this to clean up my open PRs. It's a small change and not really worth taking up your review time. Sorry for the noise.

@greymoth-jp greymoth-jp closed this Jul 4, 2026
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