Ticket #3374: 3374_2.patch

File 3374_2.patch, 789 bytes (added by Garry Yao, 11 years ago)
  • _source/plugins/indent/plugin.js

     
    235235                        var bookmarks = selection.createBookmarks( true ),
    236236                                nearestListBlock = range.getCommonAncestor();
    237237
    238                         while ( !( nearestListBlock.type == CKEDITOR.NODE_ELEMENT &&
    239                                 listNodeNames[ nearestListBlock.getName() ] ) )
     238                        while ( nearestListBlock )
     239                        {
     240                                if ( nearestListBlock.type == CKEDITOR.NODE_ELEMENT && listNodeNames[ nearestListBlock.getName() ] )
     241                                        break;
    240242                                nearestListBlock = nearestListBlock.getParent();
     243                        }
    241244
    242245                        if ( nearestListBlock )
    243246                                indentList.call( this, editor, range, nearestListBlock );
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy