Issue with Unnecessary Transactions when Removing Focus during Composition on Windows Laptop

I have identified an issue involving unnecessary transactions occurring when removing focus from an editor while typing certain IME characters, particularly Korean, on a Windows laptop.

To provide clarity, I have developed a simple example that demonstrates this behavior. Please refer to Edit fiddle - JSFiddle - Code Playground

The steps to reproduce the issue are as follows:

  1. Input any Korean character in an editor.
  2. Remove focus from the editor while a composition event is ongoing.
  3. Observe that the textContent reverts to the content just before the last input, followed by recovery to the most recent input. (You can check it in the console)

Thank you for your attention to this matter.

ProseMirror is just following the changes your IME system is making, which are often odd and indirect. But I don’t consider this an issue in the library.