Changeset 620

Show
Ignore:
Timestamp:
2007-08-03 11:21:14 (13 months ago)
Author:
martinkou
Message:

Fixed #1033 : Fixed the issue where selection becomes collapsed when style or formatting is being applied.

Location:
FCKeditor/trunk/editor/_source
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • FCKeditor/trunk/editor/_source/classes/fckeditingarea.js

    r608 r620  
    264264                        // http://sourceforge.net/tracker/index.php?func=detail&aid=1567060&group_id=75348&atid=543653 
    265265                        if ( FCKBrowserInfo.IsIE && this.Document.hasFocus() ) 
    266                         { 
    267266                                // In IE it can happen that the document is in theory focused but the active element is outside it 
    268267                                this.Document.body.setActive() ; 
    269                                 // Kludge for #141... yet more code to workaround IE bugs 
    270                                 var range = this.Document.selection.createRange() ; 
    271                                 range.moveEnd( "character", 1 ) ; 
    272                                 range.select() ; 
    273                                 range.collapse( true ) ; 
    274                                 range.select() ; 
    275                                 return ; 
    276                         } 
    277268 
    278269                        if ( FCKBrowserInfo.IsSafari ) 
     
    284275                                // In IE it can happen that the document is in theory focused but the active element is outside it 
    285276                                if ( FCKBrowserInfo.IsIE ) 
    286                                 { 
    287277                                        this.Document.body.setActive() ; 
    288                                         // Kludge for #141... yet more code to workaround IE bugs 
    289                                         var range = this.Document.selection.createRange() ; 
    290                                         range.moveEnd( "character", 1 ) ; 
    291                                         range.select() ; 
    292                                         range.collapse( true ) ; 
    293                                         range.select() ; 
    294                                 } 
    295278                        } 
    296279                } 
  • FCKeditor/trunk/editor/_source/internals/fck.js

    r602 r620  
    129129 
    130130                this.Events.FireEvent( 'OnStatusChange', newStatus ) ; 
     131 
     132                // Kludge for #141... yet more code to workaround IE bugs 
     133                var range = this.EditorDocument.selection.createRange() ; 
     134                range.moveEnd( "character", 1 ) ; 
     135                range.select() ; 
     136                range.collapse( true ) ; 
     137                range.select() ; 
     138                return ; 
    131139        }, 
    132140