Skip to content

Instantly share code, notes, and snippets.

@steveh
Created June 21, 2011 04:22
Show Gist options
  • Select an option

  • Save steveh/1037237 to your computer and use it in GitHub Desktop.

Select an option

Save steveh/1037237 to your computer and use it in GitHub Desktop.
Cursor is not visible in Firefox if CKeditor is initially hidden
/*
If you have a CKeditor input field that is initially hidden, the cursor will not show up in Firefox 3.6 when you make it visible.
You can work around this by setting the contentEditable attribute of the iframe body to false and back to true.
Example jQuery snippet:
*/
$("form.ckeditor iframe").each(function (iframe) {
$(iframe[0].contentWindow.document.body).attr({ contentEditable: false }).attr({ contentEditable: true });
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment