Bracket auto-pair swallows Japanese IME input: typing 「 inserts [] instead
Nobody has claimed this yet.
- Dominant language
- Clojure
- Stars
- 45k
- Forks
- 2.8k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 105
Description
Search first
- I searched and no similar issues were found
What Happened?
On the browser version and macOS desktop app with a Japanese input source active (Hiragana / かな), pressing the [ key should commit 「. Instead, Logseq's [ → [] autopair fires, preventDefault() cancels the IME's commit, and [] is inserted.
The result is that 「」, one of the standard Japanese quotation marks, cannot be typed in a block. The same key is shared between [ and 「, and Logseq claims it unconditionally. The same goes for other auto-paired characters such as $ or `.
Reproduce the Bug
- In test.logseq.com or Desktop app, switch the input source to Japanese (Hiragana).
- Click into a block to start editing.
- Press the [ key (the key that produces 「).
- [] is inserted with the cursor between the brackets; 「 is inserted in the middle, which is not the intended output
The same happens for $ and ` and other auto-paired characters.
Expected Behavior
With a Japanese input source active, the [ key produces 「 without the triggering of auto-pair.
Screenshots
https://github.com/user-attachments/assets/4233cc56-1006-411d-957e-259a8b3e117c
Desktop or Mobile Platform Information
Tested on both test.logseq.com and the latest macOS nightly.
Additional Context
Claude code was able to fix the code for me and I was able to confirm the fix locally.
However, I am not well versed in closure and posting code that I cannot verify myself seems irresponsible. Hit me with a comment if there is need for more information.
Are you willing to submit a PR? If you know how to fix the bug.
- I'm willing to submit a PR (Thank you!)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue does not name a file or test. First reproduce the behavior in test.logseq.com or the macOS desktop app with a Japanese Hiragana input source, then trace the editor's auto-pair handling for [, $, and `. Done means Japanese IME input commits 「 without inserting an auto-paired character, while ordinary auto-pairing still works.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- clojure, macos
- Domain
- desktop, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100