Skip to main content

intel-request: Enter key submits form when using Chinese IME — issue still exists

When using a Chinese IME, pressing Enter to confirm character selection unexpectedly triggers form submission.

Steps to reproduce:

  1. Open the form

  2. Focus on a text input field

  3. Switch input method to Chinese IME

  4. Type Chinese characters

  5. Press Enter to select a character

Expected result: Pressing Enter should confirm the IME character selection and NOT submit the form.

Actual result: The form is submitted immediately when Enter is pressed.

Environment:

  • OS: macOS

  • Browser: Edge

  • IME: Chinese IME (Traditional)

https://roadmap.embedmyreviews.com/en/p/enter-key-submits-form-when-using-chinese-ime

1 comment

Log in to comment and vote

Comments1

  • Support Team

    •

    Jul 1

    x-data="{

    imeComposing: false,

    lastCompositionEnd: 0,

    isImeEnter(e) {

    return e.isComposing || e.keyCode === 229 || this.imeComposing ||

    (e.key === 'Enter' && Date.now() - this.lastCompositionEnd < 300)

    }

    }"

    @compositionstart="imeComposing = true"

    @compositionend="imeComposing = false; lastCompositionEnd = Date.now()"

    @keydown.enter.capture="if (isImeEnter($event)) { $event.preventDefault(); $event.stopImmediatePropagation(); }"

    @submit.capture="if (Date.now() - lastCompositionEnd < 300) { $event.preventDefault(); $event.stopImmediatePropagation(); }"