Ticket #4087: 4087.patch

File 4087.patch, 2.4 KB (added by Garry Yao, 15 years ago)
  • _source/plugins/domiterator/plugin.js

     
    204204                                if ( includeNode )
    205205                                        range.setEndAt( currentNode, CKEDITOR.POSITION_AFTER_END );
    206206
     207                                currentNode = currentNode.getNextSourceNode( continueFromSibling, null, lastNode );
     208                                isLast = !currentNode;
     209
    207210                                // We have found a block boundary. Let's close the range and move out of the
    208211                                // loop.
    209212                                if ( ( closeRange || isLast ) && range )
     
    211214                                        var boundaryNodes = range.getBoundaryNodes(),
    212215                                                startPath = new CKEDITOR.dom.elementPath( range.startContainer ),
    213216                                                endPath = new CKEDITOR.dom.elementPath( range.endContainer );
     217
     218                                        // Drop the range if it only contains bookmark nodes.(#4087)
    214219                                        if ( boundaryNodes.startNode.equals( boundaryNodes.endNode )
    215                                                         && boundaryNodes.startNode.getParent().equals( startPath.blockLimit )
    216                                                         && boundaryNodes.startNode.type == CKEDITOR.NODE_ELEMENT && boundaryNodes.startNode.getAttribute( '_fck_bookmark' ) )
     220                                                && boundaryNodes.startNode.getParent().equals( startPath.blockLimit )
     221                                                && boundaryNodes.startNode.type == CKEDITOR.NODE_ELEMENT
     222                                                && boundaryNodes.startNode.getAttribute( '_fck_bookmark' ) )
     223                                        {
    217224                                                range = null;
     225                                                this._.nextNode = null;
     226                                        }
    218227                                        else
    219228                                                break;
    220229                                }
     
    222231                                if ( isLast )
    223232                                        break;
    224233
    225                                 currentNode = currentNode.getNextSourceNode( continueFromSibling, null, lastNode );
    226234                        }
    227235
    228236                        // Now, based on the processed range, look for (or create) the block to be returned.
  • CHANGES.html

     
    162162                        ckeditor2.html test case.</li>
    163163                <li><a href="http://dev.fckeditor.net/ticket/3989">#3989</a> : Host page horizontal scrolling a lot when on having righ-to-left direction.</li>
    164164                <li><a href="http://dev.fckeditor.net/ticket/4001">#4001</a> : Create link around existing image result incorrect.</li>
     165                <li><a href="http://dev.fckeditor.net/ticket/4087">#4087</a> : [Firefox]Fixed extra blocks created on create list when full document selected.</li>
    165166        </ul>
    166167        <h3>
    167168                CKEditor 3.0 RC</h3>
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy