marktext icon indicating copy to clipboard operation
marktext copied to clipboard

When I type Japanese text, use of a tab key for letter selection inserts 4 spaces

Open kouichi-c-nakamura opened this issue 5 years ago • 5 comments

Description

  • [x] Can you reproduce the issue?

Steps to reproduce

  1. 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)
  2. Type Japanese text on a Mac.
  3. Choose a candidate of letters by pressing a tab key.
  4. Then, 4 spaces are inserted to the text.
Screen Shot 2019-08-08 at 7 59 08

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 avatar Aug 08 '19 07:08 kouichi-c-nakamura

@kouichi-c-nakamura Can you show me the Google Japanese Input download link, I'll download it and test this issue.

Jocs avatar Aug 10 '19 04:08 Jocs

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

  1. After installation, select Google Japanese Input as IME.
  2. Then type whatever, eg ai
  3. Google Japanese Input will show you a list of candidates. eg. Screen Shot 2019-08-10 at 8 55 38
  4. 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.

kouichi-c-nakamura avatar Aug 10 '19 07:08 kouichi-c-nakamura

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.

shutingrz avatar Dec 05 '21 11:12 shutingrz

I got same problem

MarkText ver: v0.17.1 OS: macOS 12.2.1(intel CPU) IME: ATOK, Google

akiya3 avatar Jun 27 '22 02:06 akiya3

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?

196Ikuchil avatar Aug 20 '22 15:08 196Ikuchil