Ticket #3844: 3844.patch

File 3844.patch, 2.1 KB (added by Garry Yao, 15 years ago)
  • _source/plugins/undo/plugin.js

     
    6969                                        undoManager.save();
    7070                                });
    7171
    72                         // Make the undo manager available only in wysiwyg mode.
    73                         editor.on( 'mode', function()
    74                                 {
    75                                         if ( editor.mode == 'wysiwyg' )
    76                                         {
    77                                                 if ( !undoManager.enabled )
    78                                                 {
    79                                                         undoManager.enabled = true;
    80 
    81                                                         editor.document.on( 'keydown', function( event )
    82                                                                 {
    83                                                                         // Do not capture CTRL hotkeys.
    84                                                                         if ( !event.data.$.ctrlKey && !event.data.$.metaKey )
    85                                                                                 undoManager.type( event );
    86                                                                 });
     72                        // Registering keydown on every document recreation.(#3844)
     73                        editor.on( 'contentDom', function()
     74                        {
     75                                editor.document.on( 'keydown', function( event )
     76                                        {
     77                                                // Do not capture CTRL hotkeys.
     78                                                if ( !event.data.$.ctrlKey && !event.data.$.metaKey )
     79                                                        undoManager.type( event );
     80                                        });
    8781
     82                        } );
     83
     84                        // Make the undo manager available only in wysiwyg mode.
     85                        editor.on( 'mode', function()
     86                                {
     87                                        if ( editor.mode == 'wysiwyg' )
     88                                        {
     89                                                if ( !undoManager.enabled )
     90                                                {
     91                                                        undoManager.enabled = true;
    8892                                                        // Always save an undo snapshot - the previous mode might have changed
    8993                                                        // editor contents.
    9094                                                        undoManager.save( true );
  • CHANGES.html

     
    7575                <li><a href="http://dev.fckeditor.net/ticket/3829">#3829</a> : Fixed remove empty link on output data.</li>
    7676                <li><a href="http://dev.fckeditor.net/ticket/3730">#3730</a> : Indent is performing on the whole
    7777                        block instead of selected lines in enterMode = BR.</li>
     78                <li><a href="http://dev.fckeditor.net/ticket/3844">#3844</a> : Fixed UndoManager register keydown on obsoleted document</li>
    7879        </ul>
    7980        <h3>
    8081                CKEditor 3.0 RC</h3>
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy