I tried the side option, but it seemed to not make much of a difference. The caret would be displayed on either side of the decoration depending on which side I navigated there with the arrow keys with side===1.
I am using the newest 0.22.x packages published to npm. I believe prosemirror-transform is just used as a dependency of some of the packages I depend on. I don’t import it directly anywhere, so I don’t think I get the last patch update of that package, but all the other ones should be up to date.
Invisible cursors are usually browser bugs (verify that the DOM selection is what it should be – if it isn’t that may be a ProseMirror bug, but I’ve often seen cursors vanish next to uneditable widgets). You can sometimes work around that with CSS tweaks, but I don’t have a ready-made recipe to solve it in generally.
Interesting. This was also happening to us at times. One thing to try if the caret isn’t shown is to find the coordinates (
window.getSelection().getRangeAt(0).getBoundingClientRect()) and then draw a caret there manually by placing it in another element on top of the editing text and positioning with CSS. But that would likely only make sense if one can make sure that the caret never shows. Has anyone here experimented with this? Did it work?