Changeset 3808

Show
Ignore:
Timestamp:
2009-07-03 08:40:41 (9 months ago)
Author:
martinkou
Message:

Fixed #3849 : Fixed IE8 crashes when applying lists and indenting.

Location:
CKEditor/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • CKEditor/trunk/CHANGES.html

    r3802 r3808  
    9393                <li><a href="http://dev.fckeditor.net/ticket/3639">#3639</a> : Button size was inconsistent.</li> 
    9494                <li><a href="http://dev.fckeditor.net/ticket/3874">#3874</a> : Paste as plain text in Safari loosing lines.</li> 
     95                <li><a href="http://dev.fckeditor.net/ticket/3849">#3849</a> : Fixed IE8 crashes when applying lists and indenting.</li> 
    9596        </ul> 
    9697        <h3> 
  • CKEditor/trunk/_source/plugins/selection/plugin.js

    r3770 r3808  
    944944                { 
    945945                        var collapsed = this.collapsed; 
    946                         var isStartMakerAlone; 
     946                        var isStartMarkerAlone; 
    947947                        var dummySpan; 
    948948 
     
    977977                        else 
    978978                        { 
    979 // The isStartMakerAlone logic comes from V2. It guarantees that the lines 
    980 // will expand and that the cursor will be blinking on the right place. 
    981 // Actually, we are using this flag just to avoid using this hack in all 
    982 // situations, but just on those needed. 
    983  
    984 // But, in V3, somehow it is not interested on working whe hitting SHIFT+ENTER 
    985 // inside text. So, let's jsut leave the hack happen always. 
    986  
    987 // I'm still leaving the code here just in case. We may find some other IE 
    988 // weirdness and uncommenting this stuff may be useful. 
    989  
    990 //                              isStartMakerAlone = ( !startNode.hasPrevious() || ( startNode.getPrevious().is && startNode.getPrevious().is( 'br' ) ) ) 
    991 //                                      && !startNode.hasNext(); 
     979                                // The isStartMarkerAlone logic comes from V2. It guarantees that the lines 
     980                                // will expand and that the cursor will be blinking on the right place. 
     981                                // Actually, we are using this flag just to avoid using this hack in all 
     982                                // situations, but just on those needed. 
     983                                isStartMarkerAlone = !startNode.hasPrevious() || ( startNode.getPrevious().is && startNode.getPrevious().is( 'br' ) ); 
    992984 
    993985                                // Append a temporary <span>&#65279;</span> before the selection. 
     
    1000992                                dummySpan.insertBefore( startNode ); 
    1001993 
    1002 //                              if ( isStartMakerAlone ) 
    1003 //                              { 
     994                                if ( isStartMarkerAlone ) 
     995                                { 
    1004996                                        // To expand empty blocks or line spaces after <br>, we need 
    1005997                                        // instead to have any char, which will be later deleted using the 
     
    1007999                                        // \ufeff = Zero Width No-Break Space (U+FEFF). (#1359) 
    10081000                                        this.document.createText( '\ufeff' ).insertBefore( startNode ); 
    1009 //                              } 
     1001                                } 
    10101002                        } 
    10111003 
     
    10161008                        if ( collapsed ) 
    10171009                        { 
    1018 //                              if ( isStartMakerAlone ) 
    1019 //                              { 
     1010                                if ( isStartMarkerAlone ) 
     1011                                { 
    10201012                                        // Move the selection start to include the temporary \ufeff. 
    10211013                                        ieRange.moveStart( 'character', -1 ); 
     
    10251017                                        // Remove our temporary stuff. 
    10261018                                        this.document.$.selection.clear(); 
    1027 //                              } 
    1028 //                              else 
    1029 //                                      ieRange.select(); 
     1019                                } 
     1020                                else 
     1021                                        ieRange.select(); 
    10301022 
    10311023                                dummySpan.remove();