Ticket #1522: 1522.patch
File 1522.patch, 1.8 KB (added by , 16 years ago) |
---|
-
editor/_source/classes/fckdomrange_ie.js
109 109 oIERange.setEndPoint( 'EndToEnd', oIERangeEnd ) ; 110 110 oIERange.moveEnd( 'character', -1 ) ; 111 111 } 112 else 112 113 if ( oIERange.text.length == 0 && oIERange.boundingWidth == 0 ) 113 114 { 114 115 bIsStartMakerAlone = ( forceExpand || !eStartMarker.previousSibling || eStartMarker.previousSibling.nodeName.toLowerCase() == 'br' ) && !eStartMarker.nextSibing ; 115 116 116 // Append a temporary <span>& nbsp;</span> before the selection.117 // Append a temporary <span></span> before the selection. 117 118 // This is needed to avoid IE destroying selections inside empty 118 119 // inline elements, like <b></b> (#253). 119 120 // It is also needed when placing the selection right after an inline … … 139 140 this._Range.setStartBefore( eStartMarker ) ; 140 141 eStartMarker.parentNode.removeChild( eStartMarker ) ; 141 142 142 if ( bIsCollapsed)143 if ( eEndMarker ) 143 144 { 145 this._Range.setEndBefore( eEndMarker ) ; 146 eEndMarker.parentNode.removeChild( eEndMarker ) ; 147 oIERange.select() ; 148 } 149 150 if ( dummySpan ) 151 { 144 152 if ( bIsStartMakerAlone ) 145 153 { 146 // Move the selection start to include the temporary & nbsp;.154 // Move the selection start to include the temporary . 147 155 oIERange.moveStart( 'character', -1 ) ; 148 156 149 157 oIERange.select() ; … … 156 164 157 165 FCKDomTools.RemoveNode( dummySpan ) ; 158 166 } 159 else160 {161 this._Range.setEndBefore( eEndMarker ) ;162 eEndMarker.parentNode.removeChild( eEndMarker ) ;163 oIERange.select() ;164 }165 167 } 166 168 167 169 FCKDomRange.prototype._GetSelectionMarkerTag = function( toStart )