Compositionend not fire when prosemirror-view upgrade to 1.33.3 and above



JavaScript shouldn’t even be able to prevent composition events from firing. This seems like it might be a bug in your IME software.

But i downgrade prosemirror-view to 1.33.2, it worked.

20240522200606_rec_ @marijn You can see the differences

I’m not doubting that this changed across a ProseMirror version. It’s just that this sounds like a browser or IME bug that’s triggered by the different behavior from ProseMirror.

@marijn Sorry to bother you again.

After some researching, I found the “problematic” code.

Before this modification, currentCompositionNode is textBefore, because textAfter is null, and will not rewrite by

if (!descAfter || descAfter instanceof TextViewDesc && descAfter.node.text != textAfter.nodeValue)
                textNode = textAfter; // this line

So currentCompositionNode is text 123

After this modification, currentCompositionNode is text 456, but i’m currently modifing text 123

Q1: Do you think this is a bug?

Q2: Why change to the “problematic” code

1 Like

Can you see if this patch helps?

Because the old code was incorrect, even if it did accidentally help in your case.

Yes, it worked

Thanks for confirming. I’ve tagged prosemirror-view 1.33.8.