Input error when IME prediction is turned on

Issue details

When marks are applied (e.g., “Bold” or “Underline”) while typing with a SouGou IME, Android devices seem to duplicate the characters after composition status is ended and new characters are input.

Steps to reproduce

  1. Go to the basic editor at ProseMirror basic example on broswer of android device.
  2. Enable IME’s prediction feature
  3. Put the cursor at the end of a “Bold” text in the editor
  4. Begin typing, e.g… type a “y”
  5. Wait about 5s
  6. Type anything

ProseMirror version


Affected platforms


Screenshots / Screencast (Optional)


Pre-analysis: We found the below snippet in prosemirror-view/src/input.ts,so that makes sense why editor will exit composition after 5 seconds of inactivity on Android. What I’m curious is why there is no compositionend event fired?

const timeoutComposition = ? 5000 : -1