Changeset 5102


Ignore:
Timestamp:
2010-02-12 12:48:59 (2 years ago)
Author:
garry.yao
Message:

Fixing [4611]: Range measure around select is buggy in IE7, safe guard by adding a try..catch.

Location:
CKEditor/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • CKEditor/trunk/CHANGES.html

    r5101 r5102  
    8888                <li><a href="http://dev.fckeditor.net/ticket/5123">#5123</a> : Fixed broken XHTML in User Interface Languages sample.</li> 
    8989                <li><a href="http://dev.fckeditor.net/ticket/4893">#4893</a> : Editor should understand table cell inline styles.</li> 
     90                <li><a href="http://dev.fckeditor.net/ticket/4611">#4611</a> : Selection around &lt;select&gt; in editor doesn't anymore cause error.</li> 
    9091                <li>Updated the following language files:<ul> 
    9192                        <li><a href="http://dev.fckeditor.net/ticket/5006">#5006</a> : Dutch;</li> 
  • CKEditor/trunk/_source/plugins/selection/plugin.js

    r5100 r5102  
    507507                                                var distance = testRange.text.replace( /(\r\n|\r)/g, '\n' ).length; 
    508508 
    509                                                 while ( distance > 0 ) 
    510                                                         distance -= siblings[ --i ].nodeValue.length; 
     509                                                try 
     510                                                { 
     511                                                        while ( distance > 0 ) 
     512                                                                distance -= siblings[ --i ].nodeValue.length; 
     513                                                } 
     514                                                // Measurement in IE could be somtimes wrong because of <select> element. (#4611) 
     515                                                catch( e ) 
     516                                                { 
     517                                                        distance = 0; 
     518                                                } 
     519 
    511520 
    512521                                                if ( distance === 0 ) 
Note: See TracChangeset for help on using the changeset viewer.
© 2003 – 2011 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy