firefox & chrome issue when editor hidden by display:none becomes visible with display:block

Last post 08-03-2011, 7:25 AM by Kenneth. 1 replies.
Sort Posts: Previous Next
  •  08-02-2011, 6:26 AM 69162

    firefox & chrome issue when editor hidden by display:none becomes visible with display:block

    Hi,
     
    I've seen this issue reported for the asp and .net versions of the cuteeditor (see http://cutesoft.net/forums/thread/18425.aspx) however I'm having the same problem with the php editor in both firefox and chrome (safari and IE9 are ok, haven't tried other browsers). When the editor is displayed via javascript, the toolbars don't appear, the content area is blank white and the normal / html / preview buttons are not clickable.
     
    It was apparently resolved back in 2007 for these versions (see http://cutesoft.net/forums/permalink/18425/30134/ShowThread.aspx#30134) although as it happens, the asp demo page doesn't work in firefox for me (the .net version does) but is there a fix or workaround for this for the php version?
     
    Thanks,
     
    Paul
  •  08-03-2011, 7:25 AM 69217 in reply to 69162

    Re: firefox & chrome issue when editor hidden by display:none becomes visible with display:block

    Hi paulf1,
     
    Please try the example below, it should be a workaround for you.
     
    <?php include_once("cuteeditor_files/include_CuteEditor.php") ; ?>
    <html>    
        <head>
        </head>
        <body>
            
            <form name="theForm" method="post" ID="Form1">
                    <div id="div1" style="visibility:hidden">
                   <?php
                $editor=new CuteEditor();
                $editor->ID="Editor1";
                $editor->Draw();
                $editor=null;
            ?>    
            
            </div>
         <input type="button" value="Show" onclick="hideAndShow()" />
            </form>
        </body>
    </html>

    <script>
    window.onload=function()
    {
           var div1=document.getElementById("div1");
           div1.style.display="none";
    }
    function hideAndShow()
    {
        var div1=document.getElementById("div1");
        if(div1.style.display=="none")
        {
         div1.style.visibility="visible";
            div1.style.display="block";
             
        }
        else
        {
            div1.style.display="none";
        }
    }
    </script>
     
     
    Regards,
     
    ken
View as RSS news feed in XML