Chrome seems to automatically assign some height to the content paragraph, but Firefox doesn't. A simple solution is to add a minimum height to the paragraph.
<p contenteditable="true" style="min-height:15px"></p>
Now we donβt need to worry about extra spaces and unnecessary br tags
source
share