Skip to content

Bug: Malfunction of @keydown.enter when inputting Japanese on MacOS #3418

Closed

Description

@196Ikuchil

Description

When creating a new file or directory in the sidebar, typing Japanese causes @keydown.enter to malfunction.
In Japanese, there are two times to press the Enter key.

  • First is when converting input to kanji.
  • Second is when completing input (when generating a file).

I would like @keydown.enter to be executed only the second time, but in fact, it is executed on the first press of Enter key and seems to be trying to generate a file without any text being entered. (And it fails to create the file because it has no filename entered.)

This problem should occur in languages other than Japanese where an IME is required, such as Chinese and Korean.
(Also this problem has occurred only on macOS.)

At least using @keypress.enter instead avoids this problem.
I think this is the better way to fix this. quickly without effect some logic.

  • Can you reproduce the issue?

Expected behavior:
Event @keydown.enter run only when the enter key is pressed a second time (decision input).

Actual behavior:
Event @keydown.enter run at the first time(converting input)

Link to an example: [optional]

For example, these codes occur the bug of this issue.

@keydown.enter="handleInputEnter"


@keydown.enter="handleInputEnter"

And then, like this method is called with no input.

handleInputEnter () {

Versions

  • MarkText version: master branch
  • Operating system: MacOS 12.4

Activity

  1. added
    🐛 bug
    🪲 pri/major
    🍏 platform/macOS
    on May 16, 2026
  2. Jocs commented on Jun 23, 2026

    @Jocs
    Member

    Thank you for reporting this and for the clear explanation of the IME double-Enter problem. The sidebar components have been rewritten since this was filed: the new treeFolder.vue and tree.vue both use @keypress.enter (and the rename dialog uses @keyup.enter) for all file/directory name inputs, which is the exact fix you suggested. This means the first IME composition Enter no longer triggers file creation. We're closing this as resolved. Please reopen if you can still reproduce it with the latest build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    🪲 pri/major🍏 platform/macOS🐛 bug🔭 area/editor

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions