[FIXED] HTML Editor inside an update panel?

  1. #1

    [FIXED] HTML Editor inside an update panel?

    Hello guys,
    I was playing with the coolite controls today and really enjoyed it. However, just found a strange behavious of the HtmlEditor placed on an update panel.

    Please try the following code:

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="test.aspx.cs" Inherits="Admin_test" %>
    <%@ Register assembly="Coolite.Web.UI" namespace="Coolite.Web.UI" tagprefix="cool" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>HTML Editor Test</title>
    </head>
    <body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager2" runat="server">
            </asp:ScriptManager>
        <cool:ScriptManager ID="ScriptManager1" runat="server" />
        
            <asp:Button ID="Button1" runat="server" Text="Update HTML Editor" 
                &#111;nclick="Button1_Click" />
        
    
        <div style="border:2px solid #c90000; padding:20px; margin:20px;">
            <asp:UpdatePanel ID="UpdatePanel1" runat="server" ChildrenAsTriggers="False" UpdateMode="Conditional">
                <ContentTemplate>
                    <cool:HtmlEditor ID="HtmlEditor1" runat="server" />
                </ContentTemplate>
                <Triggers>
                    <asp:AsyncPostBackTrigger ControlID="Button1" EventName="Click" />
                </Triggers>
            </asp:UpdatePanel>
        
    
        
            <asp:Button ID="Button2" runat="server" Text="Update the 2nd panel" 
                &#111;nclick="Button2_Click" />
        
    
        <div style="border:2px solid #c90000; padding:20px; margin:20px;">
            <asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
                <ContentTemplate>
                    <asp:Label ID="Label1" runat="server"></asp:Label>
                </ContentTemplate>
                <Triggers>
                    <asp:AsyncPostBackTrigger ControlID="Button2" EventName="Click" />
                </Triggers>
            </asp:UpdatePanel>
        
     
    </form>
    </body>
    </html>
    And the code behind is quite simple:

    public partial class Admin_test : System.Web.UI.Page
    {
        protected void Button1_Click(object sender, EventArgs e)
        {
            HtmlEditor1.Text += "Updated! ";
        }
        protected void Button2_Click(object sender, EventArgs e)
        {
            Label1.Text += "Label updated! "; 
        }
    }
    When you click on Button1, the HtmlEditor is bein updated as expected. However, when you click on Buttton2, it seems that another instance on the HtmlEditor is being created inside UpdatePanel1. And that is for every Button2 click. Weird...

    Or, I'm doing something wrong?

    Regards,
    Julian
  2. #2

    RE: [FIXED] HTML Editor inside an update panel?

    Hi Julian,

    Thanks for the sample. I'll test this out and let you know what's going wrong. We're expecting to release version 0.4 on Tuesday, so if a fix is necessary, I'll do my best to squeeze it into 0.4.
    Geoffrey McGill
    Founder
  3. #3

    RE: [FIXED] HTML Editor inside an update panel?



    I apologize for the delay in getting back to you regarding this issue.

    I have reproduced the bug, but do not have a fix (yet). I have an idea why this is happening, although a solution is going to involve some re-plumbing inside the Assembly. I will do my best to keep this thread updated with our progress.
    Geoffrey McGill
    Founder
  4. #4

    RE: [FIXED] HTML Editor inside an update panel?

    This bug has been fixed with the latest release. Please download from the following location.

    http://www.ext.net/download/

    Hope this helps.
    Geoffrey McGill
    Founder

Similar Threads

  1. [CLOSED] Html editor text update
    By SymSure in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Feb 08, 2012, 8:35 AM
  2. Replies: 2
    Last Post: Nov 07, 2011, 7:13 AM
  3. Replies: 1
    Last Post: Nov 16, 2010, 3:59 AM
  4. TINYMCE HTML Editor in tab panel
    By CoolNoob in forum 1.x Help
    Replies: 0
    Last Post: Nov 13, 2009, 7:24 AM
  5. [FIXED] [V0.8] Update Html ToolTip
    By methode in forum Bugs
    Replies: 4
    Last Post: Apr 28, 2009, 3:42 PM

Posting Permissions