Opened 12 years ago

Last modified 11 years ago

#8712 review Bug

CKEditor.NET 3.6.1: ASP.NET MaintainScrollPositionOnPostback=true does not work for links after update panel if CKEditor is present on page

Reported by: dpomt2 Owned by: kaga
Priority: Normal Milestone:
Component: Server : ASP.Net Version: 3.6.1
Keywords: Cc:


In ASP.NET there is a page directive to enforce scroll position after (either full or partial) postback. Scroll position is wrong if postback is triggered by a link button that is located aftern an update panel and if there is a CKEditor.NET control on the page. If you remove the CKEditor.NET control, scroll position is correctly after postback.

To Reproduce, create web site with ckedior in subdirectory, reference to CKEDitor.NET control and create a srolltest.aspx page with the following content. Display the page, scroll to the botton of the page and hit the link. Postback will be done and scroll position is wrong after postback. Repeat the test after removing the CKEDITOR.NET control from the aspx and scroll position will be ok.

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="scrolltest.aspx.cs" Inherits="scrolltest"
    MaintainScrollPositionOnPostback="true" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<head id="Head1" runat="server">
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true">
    <CKEditor:CKEditorControl ID="TextBox1" Text='y' runat="server" Width="800" PasteFromWordCleanupFile="true"
        PasteFromWordNumberedHeadingToList="True" PasteFromWordPromptCleanup="True" PasteFromWordRemoveFontStyles="True">
        <br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
        <asp:LinkButton ID="LinkButton1" runat="server">DoPostback 1</asp:LinkButton><br />
        <br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
        <br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
        <asp:LinkButton ID="LinkButton4" runat="server">psotback before upd-panel</asp:LinkButton>
        <asp:UpdatePanel ID="up" runat="server" UpdateMode="Conditional">
                <asp:LinkButton ID="LinkButton2" runat="server">Async Postback im Upd.Panel</asp:LinkButton>
        <asp:LinkButton ID="LinkButton3" runat="server">DoPostback-after-up-panel 1</asp:LinkButton>
        <br /><br /><br /><br /><br /><br />
        Kurz vor Ende Form</h2>
    <asp:LinkButton ID="lb" runat="server">DoPostback-after-up-panel 2</asp:LinkButton>
    <br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />

Any help is greatly appreciated. Thanks.

Attachments (2)

8712.patch (1.4 KB) - added by kaga 12 years ago.
scrolltest.aspx (2.4 KB) - added by Wiktor Walc 12 years ago.

Download all attachments as: .zip

Change History (5)

Changed 12 years ago by kaga

Attachment: 8712.patch added

comment:1 Changed 12 years ago by kaga

Owner: set to kaga
Status: newreview

Changed 12 years ago by Wiktor Walc

Attachment: scrolltest.aspx added

comment:2 Changed 12 years ago by Wiktor Walc

I am unable to reproduce the issue using the attached sample.

@dpomt2 - can you check the attached file and let me know how to reproduce it? And in which browser the issue occurs?

comment:3 Changed 11 years ago by dpomt2

Sorry for getting back so late.

@kaga I have tested 8712.patch with current 3.6.4 - fix works great. Would you please integrate it in the official release and provide this ASAP? Thank you.

@wwalc the issue is easy to reproduce - just create a new ASP.NET website in VS, add the scrolltest.aspx attached to this ticket, call this scrolltest.aspx from any browser (reproduce it here with IE and Firefox), scroll down to the end of the page, clickt at one of the two last link. Without the fix, after clicking one of the buttons a postback is done and scrollposition is wrong. With the fix, the scrollposition is correct.

I was not able to test the fix with 3.6.1 since the patch seems not to be suitable for this old release (CKEditorControl.cs is different at the lines of the patch). With 3.6.4, patch was easy to apply and worked as mentioned previously.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy