Is the following functionality a bug in Chrome, or is it correct behavior that I don't understand?
In Chrome (version 25), if I have a content editable span which has a node added after it through a :after css class, as in this jsfiddle
http://jsfiddle.net/yQBvn/
if I delete all of the content of the span, after I've deleted the last character, Chrome adds a <br>
to the content editable span. This doesn't feel right.
I've verified that Chrome does not do this if the :after css content isn't added, and I've verified that Firefox doesn't do this in any case.
Wanna see something CRAZY?!
http://jsfiddle.net/joeframbach/VXMEN/
<body>
<div id="EDIT-AREA">
<span class='CHARACTER-NAME' contenteditable='true'>Bob</span><span> </span>
</div>
</body>
Adding a span with a space after it fixes the problem. Don't ask me why or how.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With