Changeset 1053
- Timestamp:
- 2007-10-30 15:07:06 (2 years ago)
- Location:
- FCKeditor/trunk/editor/_source/classes
- Files:
-
- 2 modified
-
fckdomrange_ie.js (modified) (2 diffs)
-
fckenterkey.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
FCKeditor/trunk/editor/_source/classes/fckdomrange_ie.js
r1029 r1053 67 67 } 68 68 69 FCKDomRange.prototype.Select = function( )69 FCKDomRange.prototype.Select = function( forceExpand ) 70 70 { 71 71 if ( this._Range ) 72 this.SelectBookmark( this.CreateBookmark( true ) ) ;72 this.SelectBookmark( this.CreateBookmark( true ), forceExpand ) ; 73 73 } 74 74 75 75 // Not compatible with bookmark created with CreateBookmark2. 76 76 // The bookmark nodes will be deleted from the document. 77 FCKDomRange.prototype.SelectBookmark = function( bookmark )77 FCKDomRange.prototype.SelectBookmark = function( bookmark, forceExpand ) 78 78 { 79 79 var bIsCollapsed = this.CheckIsCollapsed() ; … … 112 112 else 113 113 { 114 bIsStartMakerAlone = ( !eStartMarker.previousSibling || eStartMarker.previousSibling.nodeName.toLowerCase() == 'br' ) && !eStartMarker.nextSibing ;114 bIsStartMakerAlone = ( forceExpand || !eStartMarker.previousSibling || eStartMarker.previousSibling.nodeName.toLowerCase() == 'br' ) && !eStartMarker.nextSibing ; 115 115 116 116 // Append a temporary <span> </span> before the selection. -
FCKeditor/trunk/editor/_source/classes/fckenterkey.js
r1048 r1053 519 519 520 520 var bHasShift = this._HasShift ; 521 var bIsPre = false ; 521 522 522 523 if ( !bHasShift && sStartBlockTag == 'LI' ) … … 538 539 else 539 540 { 540 var eLineBreak = null ; 541 if ( sStartBlockTag.IEquals( 'pre' ) ) 541 var eLineBreak ; 542 bIsPre = sStartBlockTag.IEquals( 'pre' ) ; 543 if ( bIsPre ) 542 544 eLineBreak = this.Window.document.createTextNode( FCKBrowserInfo.IsIE ? '\r' : '\n' ) ; 543 545 else … … 575 577 oRange.Collapse( true ) ; 576 578 577 oRange.Select( ) ;579 oRange.Select( bIsPre ) ; 578 580 } 579 581