Skip to content

[Bug]: 🐛 Japanese IME Enter key triggers unintended execution #442

@moriya-secure-navi

Description

@moriya-secure-navi

Summary

Summary

When using Japanese IME, pressing Enter to confirm text conversion also triggers an unintended execution / submit action in OpenWork. This makes it trivially easy to accidentally run commands or confirm actions while still composing text.

Technical Notes

This issue likely occurs because the IME composition state is not being respected.

Possible causes:

  • keydown / keyup handling does not check event.isComposing
  • Missing handling of compositionstart / compositionend events

Recommended fix pattern:

if (event.key === "Enter" && event.isComposing) {
  return; // Do not execute while IME is active
}

Why this matters

This is not a user error but a known i18n issue common in English-first UIs. Without IME-aware handling, Japanese users are very likely to trigger accidental executions.

Additional Context

Similar issues have been reported and fixed in other OSS projects by respecting IME composition events.

Happy to help test a fix if needed. 🙏

Steps to reproduce

Environment

  • OS: macOS
  • Input Method: Japanese IME (macOS IME / Google IME)
  • Browser or App: App
  • OpenWork version / commit hash: Version 0.11.9 (0.11.9)

Steps to Reproduce

  1. Enable Japanese IME
  2. Focus on a text input field in OpenWork
  3. Start typing Japanese text (with IME composition active)
  4. Press Enter to confirm the conversion

Expected behavior

Expected Behavior

  • Pressing Enter during IME composition should only confirm text conversion
  • No execution / submit action should occur until:
    • IME composition has ended, and
    • The user explicitly presses Enter again (or uses a dedicated shortcut like Ctrl+Enter)

Actual behavior

Actual Behavior

  • The IME conversion is confirmed and
  • A command / submit / execute action is also triggered

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions