rangy icon indicating copy to clipboard operation
rangy copied to clipboard

saveCharacterRanges doesn't account for empty lines entered in IE contenteditable divs

Open AdamDarlow opened this issue 8 years ago • 1 comments

When typing empty lines in a contenteditable div in IE11, the newlines get represented by empty p tags. saveCharacterRanges doesn't appear to count these, meaning that you can't restore the range properly. In the demo below, try typing in 5 or 6 consecutive newlines and then clicking around in the lower empty lines. You'll see the cursor jump to earlier lines.

http://jsbin.com/kajize/2/edit?html,output

AdamDarlow avatar May 07 '16 03:05 AdamDarlow

I have a similar problem and I think it has the same root... :(

DumboJet avatar Dec 21 '17 13:12 DumboJet