Edit cursor not displayed on Chrome in contenteditable
The problem is that span
s are inline elements. Just add display:block;
to your CSS and it will fix the problem.
$(myspan).focus();
#myspan { border: 0; outline: 0; display: block;}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script><span id="myspan" contenteditable=true></span>
I added padding to the left and the cursor appears.
#myspan{ border: 0; outline: 0; min-width: 100px; height: 30px; padding-left: 1px;}