contentEditable cursor position/style in FireFox

Posted by Ben McCann on Stack Overflow See other posts from Stack Overflow or by Ben McCann
Published on 2009-12-31T23:07:44Z Indexed on 2010/06/06 22:42 UTC
Read the original article Hit count: 516

I'm having trouble using contentEditable in FireFox 3. I have a problem where the cursor will appear above or only partially in the div after I click in it (until I start typing at which time it behaves correctly). Any ideas on how I can stop this from happening?

HTML:

<html>
  <head><title>Test Page</title></head>
  <body>
    <div id="editor" style="position:absolute; left:157px; top:230px; width:120px; height:30px">
      <div id="input" style="width:100%; height:100%; border:1px solid black; outline:none" contentEditable="true"> </div>
    </div>
  </body>
</html>

alt text

© Stack Overflow or respective owner

Related posts about richtextbox

Related posts about contenteditable