Undo/Redo functionality does not work correctly in IE9

2 posts, 0 answers
  1. Toldo
    Toldo avatar
    4 posts
    Member since:
    Jul 2012

    Posted 11 Jul 2012 Link to this post

    Hello,
    We faced a problem that undo/redo functionality does not work correctly in IE9.
    The issue can be reproduced on RadEditor demo.

    1. Place a cursor into the text begining.
    2. Press Enter several times.
    Undo/Redo buttons do not work for such a change.

    Could you please respond if it can be fixed?
  2. Vessy
    Admin
    Vessy avatar
    2342 posts

    Posted 12 Jul 2012 Link to this post

    Hi Toldo,

    We are aware of this issue - the Enter command in RadEditor is not logged currently in the Undo/Redo list to not decrease the editing performance when editing a large document as well as to eat memory.

    Nevertheless, you can add it to the list using the following code (note that the NewLineMode property should be set to "P", which inserts the paragraph mode):

    <telerik:RadEditor ID="RadEditor1" runat="server" NewLineMode="P" OnClientLoad="OnClientLoad"></telerik:RadEditor>
    <script type="text/javascript">
        function OnClientLoad(editor, args)
        {
            editor.attachEventHandler("onkeydown", function (e) {
                if (e.keyCode == 13) {
                    var oCmd = new Telerik.Web.UI.Editor.GenericCommand("Enter", editor.get_contentWindow(), editor);
                    editor.executeCommand(oCmd);
                }
            });
        }
    </script>


    Regards,
    Veselina
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top