Changeset 717

Show
Ignore:
Timestamp:
2007-08-25 14:34:08 (17 months ago)
Author:
martinkou
Message:

Fix for #1095 : Proposed fix for the issue where the caret jumps around in Opera after pressing backspace.

Files:
1 modified

Legend:

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

    r694 r717  
    219219                var removeStartNode     = false ; 
    220220                var removeEndNode       = false ; 
     221                 
     222                if ( FCKBrowserInfo.IsOpera ) 
     223                { 
     224                        this._OperaSelection = this._Document.parentWindow.getSelection() ; 
     225                        this._OldEndNode = endNode ; 
     226                        this._OldStartNode = startNode ; 
     227                } 
    221228 
    222229                // Check the start and end nodes and make the necessary removals or changes. 
     
    228235                // second part. The removal will be handled by the rest of the code . 
    229236                if ( endNode.nodeType == 3 ) 
     237                { 
    230238                        endNode = endNode.splitText( endOffset ) ; 
     239                        if ( FCKBrowserInfo.IsOpera ) 
     240                        { 
     241                                var range = this._Document.createRange() ; 
     242                                range.setStart( this._OldEndNode, this._OldEndNode.nodeValue.length ) ; 
     243                                range.setEnd( this._OldEndNode, this._OldEndNode.nodeValue.length ) ; 
     244                                this._OperaSelection.removeAllRanges() ; 
     245                                this._OperaSelection.addRange( range ) ; 
     246                        } 
     247                } 
    231248                else 
    232249                {