How to add decoration without focusing the editor on dispatch?

Upon further testing, version 6.0.0 did not have this issue, but 6.0.1 does. 6.0.1 release notes describe only two changes, including:

Avoid DOM selection corruption when the editor doesn’t have focus but has selection and updates its content.

So this appears relevant. There are three commits modifying selections in between releases:

That fix was developed in response to Selections and Life Cycle.

My current understanding is that the current behaviour is a side-effect of another fix, and not necessarily by design. I still don’t know how to fix/workaround this. My problem is that I have a focus listener that is beyond my control and cannot just blur the editor again, as once the focus event was emitted it is already too late.

1 Like