Changeset 742

Show
Ignore:
Timestamp:
2007-08-29 04:59:49 (15 months ago)
Author:
martinkou
Message:

Fixed #332 : Fixed the issue where setting the caret position to the end of an <a> tag with the mouse doesn't terminate the <a> tag.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • FCKeditor/trunk/editor/_source/internals/fck_gecko.js

    r726 r742  
    6969                        return ; 
    7070 
    71                 var keyCode = evt.keyCode ; 
    72                 // ignore if positioning key is not pressed. 
    73                 // left or up arrow keys need to be processed as well, since <a> links can be expanded in Gecko's editor 
    74                 // when the caret moved left or up from another block element below. 
    75                 if ( keyCode < 33 || keyCode > 40 ) 
    76                         return ; 
     71                if ( evt.type == 'keypress' ) 
     72                { 
     73                        var keyCode = evt.keyCode ; 
     74                        // ignore if positioning key is not pressed. 
     75                        // left or up arrow keys need to be processed as well, since <a> links can be expanded in Gecko's editor 
     76                        // when the caret moved left or up from another block element below. 
     77                        if ( keyCode < 33 || keyCode > 40 ) 
     78                                return ; 
     79                } 
    7780                 
    7881                var blockEmptyStop = function( node ) 
     
    183186                        selection.removeAllRanges() ; 
    184187                        selection.addRange( range ) ; 
     188                        FCK.Events.FireEvent( "OnSelectionChange" ) ; 
    185189                } 
    186190                 
     
    251255        { 
    252256                this.EditorDocument.addEventListener( 'keypress', this._ExecCheckCaret, false ) ; 
     257                this.EditorDocument.addEventListener( 'click', this._ExecCheckCaret, false ) ; 
    253258                this.AttachToOnSelectionChange( this._ExecCheckEmptyBlock ) ; 
    254259        }