Ticket #6297: 6297_2.patch

File 6297_2.patch, 1.1 KB (added by Garry Yao, 9 years ago)
  • _source/core/dom/walker.js

     
    334334                'table-column' : 1,
    335335                'table-cell' : 1,
    336336                'table-caption' : 1
    337         },
    338         blockBoundaryNodeNameMatch = { hr : 1 };
     337        };
    339338
    340339        CKEDITOR.dom.element.prototype.isBlockBoundary = function( customNodeNames )
    341340        {
    342                 var nodeNameMatches = CKEDITOR.tools.extend( {},
    343                                                                                                         blockBoundaryNodeNameMatch, customNodeNames || {} );
     341                var nodeNameMatches = CKEDITOR.tools.extend( {}, CKEDITOR.dtd.$block, customNodeNames || {} );
    344342
    345                 return blockBoundaryDisplayMatch[ this.getComputedStyle( 'display' ) ] ||
    346                         nodeNameMatches[ this.getName() ];
     343                // Don't consider floated formatting as block boundary, fall back to dtd check in that case. (#6297) 
     344                return this.getComputedStyle( 'float' ) == 'none' && blockBoundaryDisplayMatch[ this.getComputedStyle( 'display' ) ]
     345                                || nodeNameMatches[ this.getName() ];
    347346        };
    348347
    349348        CKEDITOR.dom.walker.blockBoundary = function( customNodeNames )
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy