Opened 16 years ago
Closed 16 years ago
#2267 closed Bug (duplicate)
ASP.NET integration: FCKeditor.IsDirty() can return incorrect results when UpdatePanels are used
Reported by: | Alexey Zuev | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | |
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:
- 'fckeditor/' folder contents is default.
- 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>
- 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) { } }
- 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
- Click 'Update1' button - updatePanel1 is updated
- 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
Sorry, this is duplicate of #2268. Can be deleted