rangy icon indicating copy to clipboard operation
rangy copied to clipboard

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

Open NickeyLin opened this issue 8 months ago • 0 comments

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>

NickeyLin avatar Apr 18 '25 01:04 NickeyLin