Skip to content

Fix: respect IME composition state on Enter key in dataset creating dialog - #17150

Merged
JinHai-CN merged 1 commit into
infiniflow:mainfrom
iwasaki1112:fix/dataset-name-ime-composition-enter-key
Aug 20, 2026
Merged

JinHai-CN merged 1 commit into
infiniflow:mainfrom
iwasaki1112:fix/dataset-name-ime-composition-enter-key

Conversation

@iwasaki1112

Copy link
Copy Markdown
Contributor

What

Pressing Enter to confirm IME (e.g. Japanese) text conversion in the knowledge base name field of the "Create knowledge base" dialog was incorrectly treated as the dialog's submit trigger. The composition-confirm Enter both let the IME finish composing and triggered the dialog's Enter handler, which called preventDefault() and form.requestSubmit() — causing input like "アルゴ" to be duplicated as "アルゴアルゴ".

Fix

Check event.nativeEvent.isComposing alongside the existing Enter/shiftKey check in DatasetCreatingDialog's onKeyDown, matching the same fix already applied to NextMessageInput and FloatingChatWidget in #16922.

Test plan

  • Verified locally: typing an IME word (e.g. "アルゴ") in the knowledge base name field and pressing Enter to confirm composition no longer duplicates the text.

…ialog

Pressing Enter to confirm IME (e.g. Japanese) text conversion in the
knowledge base name field was incorrectly treated as the dialog's
submit trigger. The composition-confirm Enter both let the IME finish
composing and triggered form submission handling, causing input like
"アルゴ" to be duplicated as "アルゴアルゴ". Check
event.nativeEvent.isComposing alongside the existing Enter/shiftKey
check, matching the same fix already applied to NextMessageInput and
FloatingChatWidget.
@coderabbitai

coderabbitai Bot commented Jul 21, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e3df8187-d5ff-473e-b0b6-11938f9e4559

📥 Commits

Reviewing files that changed from the base of the PR and between 3cc6539 and c8a88ba.

📒 Files selected for processing (1)
  • web/src/pages/datasets/dataset-creating-dialog.tsx

📝 Walkthrough

Walkthrough

The dataset creation dialog now ignores Enter key events during IME text composition before triggering form submission.

Changes

Dataset creation dialog

Layer / File(s) Summary
IME-safe Enter submission
web/src/pages/datasets/dataset-creating-dialog.tsx
Enter submission is skipped while the browser is composing text, while retaining submission for non-Shift Enter events outside composition.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

Suggested labels: 🐞 bug, size:XS

Suggested reviewers: jinhai-cn

Poem

I’m a bunny, and Enter now waits,
While IME finishes shaping its traits.
No rushed little leap,
The form submits neat—
Then I nibble my carrots by gates.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly states the IME composition Enter handling fix in the dataset creating dialog.
Description check ✅ Passed The description covers the issue, fix, and test plan, and provides the needed context despite not using the exact template heading.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. 🐞 bug Something isn't working, pull request that fix bug. labels Jul 21, 2026
@JinHai-CN
JinHai-CN requested a review from dcc123456 August 19, 2026 13:13
@JinHai-CN JinHai-CN added the ci Continue Integration label Aug 20, 2026
@JinHai-CN
JinHai-CN merged commit 9d46a70 into infiniflow:main Aug 20, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 bug Something isn't working, pull request that fix bug. ci Continue Integration size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants