Why Is My Contenteditable Cursor Jumping to the End in Chrome?
问题 Scenario I have a contenteditable <div> area, and within this area I may have some <span contenteditable="false"></span> containing some text. The idea is, these span elements will represent styled text that can not be edited, but may be deleted from the <div contenteditable="true"></div> area by pressing the backspace key. Issue The cursor placement is the big issue here. if you delete one of these <span> elements, the cursor jumps to the end of the <div> . More interesting, if you type some