I have an extension, part of the code look like this:
ViewPlugin.fromClass(
class {
decorations = Decoration.none;
update(update: ViewUpdate) {
if (!update.selectionSet && !update.docChanged) {
return;
}
// here is the problem
console.info(update.transactions[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?