Open pmympmm opened 7 months ago
I'm not much of a js developer but I was trying to look through the code and see whats going on. I wonder if this bug is much more widespread and the cause of the others raised recently?
I suspect it's with the range (& selection), possible when the range has an endcontainer node instead of text.
in chrome if you make one letter in the middle of a word bold, eg "one two three" and select "tw" you can get a similar paste into the wrong position. same on firefox, though oddly if you select that text with keyboard(from right or left) or mouse from left it breaks, but it seems to work with mouse from right. In chrome it breaks all ways. In the one case it works range endOffset is 0, all other cases its 1.
I'll carry on having a look when I get a chance.
Describe the bug On firefox if you have some text at the very end of the document, eg "one two three", and you select the last word then paste over it, the data pasted goes at the beginning of the sentence. If you have anything after, a full stop/period/other text/other lines it works as it should.
Seems to work fine on Chrome and only be a problem in firefox, I dont own a windows computer to check there.
To Reproduce Steps to reproduce the behavior:
Expected behavior 'one two HELLO' instead of 'HELLOone two'
Desktop (please complete the following information):