Ticket #3344: 3344.patch

File 3344.patch, 813 bytes (added by Garry Yao, 15 years ago)
  • _source/plugins/styles/plugin.js

     
    280280                var boundaryNodes = range.getBoundaryNodes();
    281281                var firstNode = boundaryNodes.startNode;
    282282                var lastNode = boundaryNodes.endNode.getNextSourceNode( true );
    283 
     283               
     284                // Probably the document end is reached, we need a marker node. 
     285                if ( !lastNode )
     286                {
     287                                lastNode = document.createText( '' );
     288                                lastNode.insertAfter( range.endContainer );
     289                }
    284290                // The detection algorithm below skips the contents inside bookmark nodes, so
    285291                // we'll need to make sure lastNode isn't the   inside a bookmark node.
    286292                var lastParent = lastNode.getParent();
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy