Skip to content

fix(frontend): ignore Enter during IME composition - #13122

Merged
SchrodingersGat merged 1 commit into
inventree:masterfrom
highvoltagescientist-arch:fix/ime-enter-during-composition
Oct 28, 2026
Merged

SchrodingersGat merged 1 commit into
inventree:masterfrom
highvoltagescientist-arch:fix/ime-enter-during-composition

Conversation

@highvoltagescientist-arch

Copy link
Copy Markdown
Contributor

Summary

Fix unintended form submission when confirming text input using an Input Method Editor (IME), commonly used for Japanese, Chinese, and Korean input.

When typing with an IME, the Enter key is used to confirm character conversion or text composition. However, forms using TextField currently interpret this Enter keypress as a form submission, causing the form to close unexpectedly while the user is still entering text.

This change prevents Enter from triggering the form's key handler while IME composition is active, using isComposing and key code 229 for compatibility.

Normal Enter key behavior remains unchanged.

Verification

  • Confirmed that pressing Enter to confirm Japanese IME input no longer submits the form.
  • Verified the fix in the development environment and a local InvenTree instance.
  • TypeScript checks and repository commit-time checks passed.

@netlify

netlify Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for inventree-web-pui-preview ready!

Name Link
🔨 Latest commit b15d845
🔍 Latest deploy log https://app.netlify.com/projects/inventree-web-pui-preview/deploys/6ae199d2f8758a38a11f6313
😎 Deploy Preview https://deploy-preview-13122--inventree-web-pui-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 96 (🟢 up 2 from production)
Accessibility: 81 (🔴 down 1 from production)
Best Practices: 92 (no change from production)
SEO: 78 (no change from production)
PWA: -
View the detailed breakdown and full score reports
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@SchrodingersGat SchrodingersGat added User Interface Related to the frontend / User Interface backport Apply this label to a PR to enable auto-backport action backport-to-1.6.x labels Oct 28, 2026
@SchrodingersGat SchrodingersGat added this to the 1.7.0 milestone Oct 28, 2026
@SchrodingersGat
SchrodingersGat merged commit 86b6c5f into inventree:master Oct 28, 2026
45 checks passed
@SchrodingersGat

Copy link
Copy Markdown
Member

@highvoltagescientist-arch thanks for the contribution :)

@github-actions

Copy link
Copy Markdown
Contributor

💚 All backports created successfully

Status Branch Result
✅ 1.6.x

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details

SchrodingersGat pushed a commit that referenced this pull request Oct 28, 2026
(cherry picked from commit 86b6c5f)

Co-authored-by: マサハル電機 <[email protected]>
Co-authored-by: TSUBASA <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Apply this label to a PR to enable auto-backport action User Interface Related to the frontend / User Interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants