marktext
marktext copied to clipboard
When I type Japanese text, use of a tab key for letter selection inserts 4 spaces
Description
- [x] Can you reproduce the issue?
Steps to reproduce
- Install Google Japanese Input to your Mac (this how I did, but I also confirmed the same behaviour with OS's default Japanese IME as well)
- Type Japanese text on a Mac.
- Choose a candidate of letters by pressing a tab key.
- Then, 4 spaces are inserted to the text.

Expected behavior:
While you're choosing a candidate of letters, tab keys should be ignored by MarkText. At this point, a Tab key is only used for going through suggested choices of letters.
The behaviour and key bindings can be dependent on IME of your choice, but I have never experienced this kind of issues in any of major editors, such as Atom or Typora.
This makes MarkText essentially unusable for Japanese users.
Actual behavior:
Tab key press is recognized by MarkText, and 4 spaces are inserted to the text.
Versions
- Mark Text: 0.15.0
- Operating system: macOS 10.14.6
- Google Japanese Input 2.25.3700.1
@kouichi-c-nakamura Can you show me the Google Japanese Input download link, I'll download it and test this issue.
Thanks for responding!
Web page is here: https://www.google.co.jp/ime/
This should be the download link:
https://tools.google.com/dlpage/japaneseinput/eula.html?platform=mac
- After installation, select Google Japanese Input as IME.
- Then type whatever, eg
ai
- Google Japanese Input will show you a list of candidates. eg.
- Now it's time for you to choose one by pressing a Tab key. And when you do it, Mark Text will insert 4 spaces.
I am also using the Mac version of MarkText and have the same problem constantly. Not only with Google IME, but also with macOS default IME.
This bug makes it very difficult for me to continue using MarkText.
I got same problem
MarkText ver: v0.17.1 OS: macOS 12.2.1(intel CPU) IME: ATOK, Google
Hello, @Jocs and everyone.
I think the cause of this problem is this code. https://github.com/marktext/marktext/blob/aed36dbf320b17bdd0e44398d5cfe45a4d357940/src/muya/lib/contentState/tabCtrl.js#L301
This handler shouldn't be called when the operation of 3. Choose a candidate
goes on.
And I confirmed that the problem doesn't occur if this function is commented out.
Could anyone please fix this function?