Open philmcmahon opened 9 years ago
From Lydia:"It's not the most urgent issue, but it's consistently affecting one of our users, so it would be good to get it fixed."
Okay, this appears to be caused by selecting the first piece of text in a node (usually a <p>
) with the keyboard. This causes firefox to return the <p>
as the currently selection, rather that its content.
We can check is the type of the selection is text, as per the nodeType
property and if it isn't (i.e. it's an element) move the selection to its firstChild
but this doesn't account for the anchorOffset
either. As a result, there is no obvious fix.
If you select text using the keyboard in firefox (e.g. shift+left) then add a link (either with the button or cmd+k) then the link itself gets pasted in instead of the text being linked. This doesn't happen in chrome.