This issue appears to only affect Chrome, not Firefox. It causes problems when we need to position an element based on window.getSelection().
Any thoughts @marijn? Is this an expected variation in contentEditable behavior across browsers or something we should expect ProseMirror to normalize?
You can reproduce it on this page: Link – Tiptap
When you type anywhere inside of a link or place the caret at the end and run document.querySelector('iframe').contentWindow.getSelection()
you’ll see #text
for the anchorNode
but if you type at the end of a link you’ll see it change to p
.