Ticket #4611: 4611_2.patch

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

     
    498498                                                // breaking character counting logic below. (#3949)
    499499                                                var distance = testRange.text.replace( /(\r\n|\r)/g, '\n' ).length;
    500500
    501                                                 while ( distance > 0 )
    502                                                         distance -= siblings[ --i ].nodeValue.length;
     501                                                try
     502                                                {
     503                                                        while ( distance > 0 )
     504                                                                distance -= siblings[ --i ].nodeValue.length;
     505                                                }
     506                                                catch( e )
     507                                                {
     508                                                        distance = 0;
     509                                                }
    503510
    504511                                                if ( distance === 0 )
    505512                                                {
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy