Ticket #7023: 7023_2.patch

File 7023_2.patch, 1015 bytes (added by Garry Yao, 14 years ago)
  • _source/plugins/selection/plugin.js

     
    664664
    665665                                                var siblings = parent.children,
    666666                                                        child,
     667                                                        sibling,
    667668                                                        testRange = range.duplicate(),
    668669                                                        startIndex = 0,
    669670                                                        endIndex = siblings.length - 1,
     
    741742                                                        // Start the measuring until distance overflows, meanwhile count the text nodes.
    742743                                                        while ( distance > 0 )
    743744                                                        {
    744                                                                 child = child[ position > 0 ? 'previousSibling' : 'nextSibling' ];
    745745                                                                try
    746746                                                                {
    747                                                                         distance -= child.nodeValue.length;
     747                                                                        sibling = child[ position > 0 ? 'previousSibling' : 'nextSibling' ];
     748                                                                        distance -= sibling.nodeValue.length;
     749                                                                        child = sibling;
    748750                                                                }
    749751                                                                // Measurement in IE could be somtimes wrong because of <select> element. (#4611)
    750752                                                                catch( e )
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy