I have created an example. Please go to
http://kratos-dev.perfpathways.com/CuteEditorTest.aspx using Safari 4.0 (PC or Mac). Then click the button that says "ShowEditor". The page loads fine the first time but if you reload/refresh the page and click the button again the WYSIWYG doesn't have any contents and you cannot click into it. I've narrowed it down to Editors contained in templated controls being made visible via a partial page update (asp:UpdatePanel, in the example, the inner UpdatePanel is only used because its the simplest control with a template field.). I have a custom templated control that has the same problem. I have no problem implementing a fix in that control instead of waiting for a new release of CuteEditor but I need help as to which javascript to run etc. I've tried reloading the src of the iframe for the WYSIWYG. This appears to fix the problem but then the contents of the WYSIWYG don't get reported back to the server upon postback. Also, non of this happens in any other browser. This seems like a minor problem but in our project if we can't get this fixed quick I will have to do
a lot of coding to get around it and go-live is just around the corner.
Here is my code:
- <%@ Page Language="VB" %>
-
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
- <script runat="server">
- Protected Sub btnShowEditor_Click(ByVal sender As Object, ByVal e As System.EventArgs)
- upInner.Visible = True
- upOuter.Update()
- End Sub
- </script>
-
- <html xmlns="http://www.w3.org/1999/xhtml" >
- <head runat="server">
- <title>Cute Editor Test</title>
- </head>
- <body>
- <form id="form1" runat="server">
- <div>
- <asp:ScriptManager ID="ScriptManager1" runat="server">
- </asp:ScriptManager>
- <asp:UpdatePanel ID="upOuter" runat="server"
- UpdateMode="Conditional">
- <ContentTemplate>
- <asp:UpdatePanel ID="upInner" runat="server" Visible="False">
- <ContentTemplate>
- <CE:Editor ID="Editor1" runat="server" Text="testme" Visible="True">
- </CE:Editor>
- </ContentTemplate>
- </asp:UpdatePanel>
- <asp:Button ID="btnShowEditor" runat="server" OnClick="btnShowEditor_Click" Text="ShowEditor" />
- </ContentTemplate>
- </asp:UpdatePanel>
- </div>
- </form>
- </body>
- </html>
Thanks in advance for your help,
bczengel