Composition issues when compositionend registered outside

I have an extension, part of the code look like this:

    class {
      decorations = Decoration.none;

      update(update: ViewUpdate) {
        if (!update.selectionSet && !update.docChanged) {

        // here is the problem[0].isUserEvent('input.type.compose'));

when I have registered an compositionend listener with useCapture=true, like this:

// any parent node outside of the mount node, like document.body
document.body.addEventListener('compositionend', () => { 
   // do nothing 
}, true)

the console.log will be true after finished the IME typing

when set useCaptrue to false, the console.log will be false after finished the IME typing.

I’m using react 16.14.0. I’m not sure whether it’s a codemirror issue or not?

Duplicate of The result of `tr.isUserEvent('input.type.compose')` is unstable in Chrome. · Issue #1116 · codemirror/dev · GitHub