I’m using setBookmark() to show the cursors of other users in a collaborative editor, with name tags above them. When a bookmark is near the border of the editor, the name tag sometimes has to reach outside of the editor window. However, the .CodeMirror HTML element uses “overflow: hidden;”. This prevents the name tags from sticking outside of the editor.
Changing the CSS rule to “overflow: visible;” introduces unwanted whitespace on the right side of the editor and means that normal text that should be inside the editor is visible below the editor. According to this thread, it also seems like this cannot be solved by styling the bookmark element but would require CodeMirror to work without using “overflow: hidden;” in a parent node of the bookmarks.
All good when the bookmark is far from the sides:
The name tag should not be cut off:
The name tag should not be cut off: