Closed templeman15 closed 11 months ago
This isn't related to the gap cursor. ProseMirror asks the browser for a DOM cursor position that corresponds to the click coordinates. Firefox returns something reasonable in this case, but Chrome, for some reason, doesn't. Attached patch adds a kludge to work around that.
Thank you @marijnh!
Hello!
I noticed this initially in my project with TipTap and then we ended up going to the TipTap demo and it occurred there, and then we tried the ProseMirror demo and it is also there.
When selecting the left hand side of a gapcursor it selects in the correct position. However, if you click on the right 50% of the editor on a gapcursor it goes to the element after.
Here is a video:
https://github.com/ProseMirror/prosemirror/assets/3027970/fe9cecc2-4612-4d63-aa8c-996f30c1e3bb
It's even a bit worse in our app if you have say two full width images and you try and click between them and it goes to the line after the 2nd image instead of between the two images.
Thanks!