Ticket #3871: 3871_2.patch

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

     
    171171
    172172                        var currentMode = getMode( this );
    173173                        data = currentMode.getData();
     174                        data = this.fire( 'beforeModeUnload', data );
    174175                        currentMode.unload( holderElement );
    175176                        this.mode = '';
    176177                }
  • _source/plugins/undo/plugin.js

     
    8181
    8282                        } );
    8383
     84                        // Always save an undo snapshot - the previous mode might have
     85                        // changed editor contents.
     86                        editor.on( 'beforeModeUnload', function()
     87                        {
     88                                editor.mode == 'wysiwyg' && undoManager.save( true );
     89                        } );
     90
    8491                        // Make the undo manager available only in wysiwyg mode.
    8592                        editor.on( 'mode', function()
    8693                                {
    87                                         if ( editor.mode == 'wysiwyg' )
    88                                         {
    89                                                 if ( !undoManager.enabled )
    90                                                 {
    91                                                         undoManager.enabled = true;
    92                                                         // Always save an undo snapshot - the previous mode might have changed
    93                                                         // editor contents.
    94                                                         undoManager.save( true );
    95                                                 }
    96                                         }
    97                                         else
    98                                                 undoManager.enabled = false;
    99 
     94                                        undoManager.enabled = editor.mode == 'wysiwyg';
    10095                                        undoManager.onChange();
    10196                                });
    10297
  • CHANGES.html

     
    8888                <li><a href="http://dev.fckeditor.net/ticket/3825">#3825</a> : Fixed JS error when opening spellingcheck.</li>
    8989                <li><a href="http://dev.fckeditor.net/ticket/3862">#3862</a> : Fixed html parser infinite loop on certain malformed
    9090                        source code.</li>
     91                <li><a href="http://dev.fckeditor.net/ticket/3871">#3871</a> : Unable to redo when undos to the front of snapshots stack.</li>
    9192        </ul>
    9293        <h3>
    9394                CKEditor 3.0 RC</h3>
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy