Ticket #6728: 6728_6.patch

File 6728_6.patch, 2.7 KB (added by Garry Yao, 13 years ago)
  • _source/plugins/bidi/plugin.js

     
    1 /*
     1/*
    22Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
    33For licensing, see LICENSE.html or http://ckeditor.com/license
    44*/
    55
    66(function()
    77{
    8         var guardElements = { table:1, tbody: 1, ul:1, ol:1, blockquote:1, div:1, tr: 1 },
     8        var guardElements = { table:1, ul:1, ol:1, blockquote:1, div:1 },
    99                directSelectionGuardElements = {},
    1010                // All guard elements which can have a direction applied on them.
    1111                allGuardElements = {};
     
    153153                        while ( ancestor && ancestor.type == CKEDITOR.NODE_ELEMENT
    154154                                        && ( parent = ancestor.getParent() )
    155155                                        && parent.getChildCount() == 1
    156                                         && ( !( ancestor.getName() in elements ) || ( parent.getName() in elements ) )
    157                                         )
     156                                        && !( ancestor.getName() in elements ) )
    158157                                ancestor = parent;
    159158
    160159                        return ancestor.type == CKEDITOR.NODE_ELEMENT
     
    209208                                        {
    210209                                                return !! ( node.type == CKEDITOR.NODE_ELEMENT
    211210                                                                && node.getName() in guardElements
    212                                                                 && !( node.getName() == ( enterMode == CKEDITOR.ENTER_P ) ? 'p' : 'div'
     211                                                                && !( node.getName() == ( enterMode == CKEDITOR.ENTER_P ? 'p' : 'div' )
    213212                                                                        && node.getParent().type == CKEDITOR.NODE_ELEMENT
    214213                                                                        && node.getParent().getName() == 'blockquote' )
    215214                                                                // Element must be fully included in the range as well. (#6485).
     
    225224
    226225                                        while ( ( block = iterator.getNextParagraph() ) )
    227226                                                !block.isReadOnly() && switchDir( block, dir, editor, database );
    228                                 }
     227                                        }
    229228
    230229                                CKEDITOR.dom.element.clearAllMarkers( database );
    231230
  • _source/plugins/domiterator/plugin.js

     
    335335                        // next interation.
    336336                        if ( !this._.nextNode )
    337337                        {
    338                                 this._.nextNode = ( isLast || block.equals( lastNode ) ) ? null :
    339                                         block.getNextSourceNode( true, null, lastNode );
    340                         }
     338                                var nextNode =  ( isLast || block.equals( lastNode ) ) ? null :
     339                                        block.getNextSourceNode( 1, null, lastNode );
    341340
    342                         if ( !bookmarkGuard( this._.nextNode ) )
    343                         {
    344                                 this._.nextNode = this._.nextNode.getNextSourceNode( true, null, function( node )
    345                                         { return !node.equals( lastNode ) && bookmarkGuard( node ); } );
     341                                while( !bookmarkGuard( nextNode ) )
     342                                        nextNode = nextNode.getNextSourceNode( 1, null, lastNode );
     343
     344                                this._.nextNode = nextNode;
    346345                        }
    347346
    348347                        return block;
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy