Hi, We’re using ProseMirror for our text fields and I’ve noticed that sometimes when I make new lines with shift+return it leaves a ghost cursor behind. I tried to reproduce the bug without ProseMirror but was unable to, so I’m trying to figure out if this is a bug with ProseMirror or if it’s a problem with Webkit. I worked with Claude to make a repo here.
P.S. The link to the issue tracker in the pinned topic here seems to be stale.
Thanks. I can reproduce this. It is definitely a browser issue though—ProseMirror doesn’t draw its own cursor, so the only cursors you’re seeing are drawn by the browser. I’ve verified that the DOM selection is as expected when the issue occurs. So most likely the way the library runs its DOM and selection update somehow confuses Safari in a way that straightforward reproduction in a normal editable element doesn’t.
I tried to poke at the issue a little, but I could only clear the ghost cursor by doing really invasive things, like temporarily setting the selection to not be empty, giving the browser the time to draw the change, and then resetting it.