Ticket #4385: 4385_2.patch

File 4385_2.patch, 1.3 KB (added by Garry Yao, 14 years ago)
  • _source/plugins/wysiwygarea/plugin.js

     
    122122                }
    123123        }
    124124
     125        // DOM modification here should not bother dirty flag.(#4385)
     126        function restoreDirty( editor )
     127        {
     128                if( !editor.checkDirty() )
     129                        setTimeout( function(){ editor.resetDirty() } );
     130        }
     131
    125132        /**
    126133         *  Auto-fixing block-less content by wrapping paragraph (#3190), prevent
    127134         *  non-exitable-block by padding extra br.(#3189)
     
    143150                         && blockLimit.getName() == 'body'
    144151                         && !path.block )
    145152                {
     153                        restoreDirty( editor );
    146154                        var bms = selection.createBookmarks(),
    147155                                fixedBlock = range.fixBlock( true,
    148156                                        editor.config.enterMode == CKEDITOR.ENTER_DIV ? 'div' : 'p'  );
     
    193201                var lastNode = body.getLast( CKEDITOR.dom.walker.whitespaces( true ) );
    194202                if ( lastNode && lastNode.getName && ( lastNode.getName() in nonExitableElementNames ) )
    195203                {
     204                        restoreDirty( editor );
    196205                        var paddingBlock = editor.document.createElement(
    197206                                        ( CKEDITOR.env.ie && enterMode != CKEDITOR.ENTER_BR ) ?
    198207                                                '<br _cke_bogus="true" />' : 'br' );
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy