ProseMirror / prosemirror

The ProseMirror WYSIWYM editor

Home Page:http://prosemirror.net/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug: Duplication of First Character When Switching to Bold/Italic with IME Enabled

Stardusten opened this issue · comments

Platform
Arch Linux, fcitx5 IME, Chrome 122.0.6261.128

Screenshots
When I enable IME (Input Method Editor) and switch to bold/italic font, the first character always duplicates. This issue is demonstrated in the following videos:

Screencast.from.2024-03-18.09-45-04.webm

Everything seems fine on Firefox.

Not sure whether to blame Chrome or the IME software, but when this happened, the reported cursor position wasn't actually adjacent to the inserted text, which threw off ProseMirror's composition handling. Attached patch should help.