Skip to content

Restore a saved character range will be wrong, if the range is immediately behind a <img/>. #488

@NickeyLin

Description

@NickeyLin

Image

I just selected the text behind the image (not including the image), but when I restored the selection, the image was also selected.

I used the textrange demo at demos/textrange.html, and edited this content:

313          <p class="demo" id="demo5" contenteditable="true">
314            Select some of this text and manipulate the selection and the formatting using the buttons above.
315         </p>
+ 316       <div style="font-size: 16px; text-align: center; text-indent: 2em;">
+ 317         <p style="text-align:center"><span class="" style="cursor: pointer" ><img src="./football.png"></span></p>
+ 318       </div>
319          <h3>Moving the caret</h3>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions