Opened 11 years ago

Closed 8 years ago

#2268 closed Bug (wontfix)

ASP.NET integration: FCKeditor.IsDirty() can return incorrect results when UpdatePanels are used

Reported by: Alexey Zuev Owned by:
Priority: Normal Milestone:
Component: Server : ASP.Net Version: SVN (FCKeditor) - Retired
Keywords: Cc:

Description

If partial page rendering is made via UpdatePanels, FCKeditor.IsDirty() of editors outside UpdatePanel that is rendered return [true]. No matter if they are dirty or not.

Steps to reproduce:

  1. 'fckeditor/' folder contents is default.
  2. aspx file content:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" 
    ValidateRequest="false" %>
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Test page</title>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="scriptManager" runat="server" />
        <div>
            <asp:UpdatePanel ID="updatePanel1" runat="server" UpdateMode="Conditional">
                <ContentTemplate>
                    <div style="border: solid 1px Black;">
                        Update panel 1
                        <FCKeditorV2:FCKeditor ID="fckEditor1" BasePath="fckeditor/" runat="server" />
                        <asp:Button ID="updateButton1" runat="server"
                            Text="Update1" 
                            OnClick="updateButton1_Click" />
                    </div>
                </ContentTemplate>
            </asp:UpdatePanel>
            <br />
            <asp:UpdatePanel ID="updatePanel2" runat="server" UpdateMode="Conditional">
                <ContentTemplate>
                    <div style="border: solid 1px Black;">
                        Update panel 2
                        <FCKeditorV2:FCKeditor ID="fckEditor2" BasePath="fckeditor/" runat="server" />
                        <asp:Button ID="updateButton2" runat="server"
                            Text="Update2"
                            OnClick="updateButton1_Click" />
                    </div>
                </ContentTemplate>
            </asp:UpdatePanel>
        </div>
    </form>
    <script type="text/javascript">
        function FCKeditor_OnComplete(editorInstance)
        {
            editorInstance.Events.AttachEvent('OnFocus', FCKEditor_OnFocus);
        }
        
        function FCKEditor_OnFocus(editorInstance)
        {
            alert(editorInstance.Name + '.IsDirty() = ' + editorInstance.IsDirty());
        }
    </script>
</body>
</html>
  1. codebehind file content
using System;
using System.Web.UI;

public partial class _Default : System.Web.UI.Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {
        fckEditor1.Value = DateTime.Now.ToString();
        fckEditor2.Value = DateTime.Now.ToString();
    }

    protected void updateButton1_Click(object sender, EventArgs e)
    {
    }

    protected void updateButton2_Click(object sender, EventArgs e)
    {
    }
}
  1. Page loads first. Set focus to first editor - 'fckEditor1.IsDirty() = false' alert as a result. Set focus to second editor - 'fckEditor2.IsDirty() = false' alert as a result. As expected
  1. Click 'Update1' button - updatePanel1 is updated
  1. Set focus to second editor - 'fckEditor2.IsDirty() = true' alert as a result. Instead of expected 'fckEditor2.IsDirty() = false'.

FCKEditor Version: 2.6, Night build .NET integration assembly: 2.5.2912.21007 Browsers: FF 2.0.0.14, IE 7.0.5730.11

Attachments (1)

FCKEditor.zip (2.7 KB) - added by Alexey Zuev 11 years ago.
ASP.NET website (without fckeditor/ folder and integration assembly)

Download all attachments as: .zip

Change History (4)

Changed 11 years ago by Alexey Zuev

Attachment: FCKEditor.zip added

ASP.NET website (without fckeditor/ folder and integration assembly)

comment:1 Changed 11 years ago by Wojciech Olchawa

Component: GeneralServer : ASP.Net

#2267 has been marked as DUP

comment:2 Changed 11 years ago by Wojciech Olchawa

Keywords: Confirmed added
Version: SVN

Confirmed both on FF2 and IE.

comment:3 Changed 8 years ago by Wiktor Walc

Resolution: wontfix
Status: confirmedclosed

There is a new ASP.NET control available: CKEditor for ASP.NET. The old control (FCKeditor.Net) is no longer maintained, so I'm closing the ticket.

If you find a similar bug in CKEditor 3.x, please create a new ticket for it.

Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy