From:  Jeff <>
Date:  22 Oct 2009 04:15:25 Hong Kong Time

Re: Disappearing caret from Rich Text Editor


I've been banging my head against the wall for a day and a half with
this same problem and finally found a solution (i.e. hack).
After an iframe with contentEditable content is hidden then
redisplayed, the code below is used to remove then re-add all the
contenteditable attributes.
I found that ALL contenteditable attributes have to be removed first
before resetting any elements back to contenteditable otherwise this
fix doesn't work.

I'm developing a medical health record application and I was having
this issue within my dialogs (which use iframes).  This fix was
testing against FF 3.5.3

BaseView.prototype.handleNavigationEvent = function(){
    if(window.frameElement && Prototype.Browser.Gecko){
        // Fix the contenteditable bug that occurs when an iframe is
hidden then re-displayed

 * Get list of editable content, strip contenteditable attributes,
then reapply
BaseView.prototype.fixFFContentEditable = function(){
    var oElements = $(document.body).select("div
("contenteditable", "true");})

** Note - I'm using prototype.js