Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 task done
196Ikuchil opened this issue Aug 20, 2022 · 0 comments · May be fixed by #3419
Open
1 task done

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

196Ikuchil opened this issue Aug 20, 2022 · 0 comments · May be fixed by #3419

Comments

@196Ikuchil
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant