Chrome adds to the content range with: after its content has been deleted; error?

Is the following function a bug in Chrome, or is this the correct behavior that I don't understand?

In Chrome (version 25), if I have editable content that has node added after it via: after the css class, as in this jsfiddle

http://jsfiddle.net/yQBvn/

if I delete the entire contents of the range, after I delete the last character, Chrome adds <br>content to the editing range. This is not true.

I confirmed that Chrome does not do this if: after the css content is not added, and I confirmed that Firefox does not do this anyway.

+5
source share
2 answers

- CRAZY?!

http://jsfiddle.net/joeframbach/VXMEN/

<body>
<div id="EDIT-AREA">
    <span class='CHARACTER-NAME' contenteditable='true'>Bob</span><span>&nbsp;</span>
</div>
</body>

. , .

+4

Firefox DIV

bam br.

CE, , bam br

, div , , : after.

Span?

Chrome .

0

All Articles