Index: editor/_source/classes/fckdomrange_ie.js
===================================================================
--- editor/_source/classes/fckdomrange_ie.js (revision 1185)
+++ editor/_source/classes/fckdomrange_ie.js (working copy)
@@ -109,11 +109,12 @@
oIERange.setEndPoint( 'EndToEnd', oIERangeEnd ) ;
oIERange.moveEnd( 'character', -1 ) ;
}
- else
+
+ if ( oIERange.text.length == 0 && oIERange.boundingWidth == 0 )
{
bIsStartMakerAlone = ( forceExpand || !eStartMarker.previousSibling || eStartMarker.previousSibling.nodeName.toLowerCase() == 'br' ) && !eStartMarker.nextSibing ;
- // Append a temporary before the selection.
+ // Append a temporary before the selection.
// This is needed to avoid IE destroying selections inside empty
// inline elements, like (#253).
// It is also needed when placing the selection right after an inline
@@ -139,11 +140,18 @@
this._Range.setStartBefore( eStartMarker ) ;
eStartMarker.parentNode.removeChild( eStartMarker ) ;
- if ( bIsCollapsed )
+ if ( eEndMarker )
{
+ this._Range.setEndBefore( eEndMarker ) ;
+ eEndMarker.parentNode.removeChild( eEndMarker ) ;
+ oIERange.select() ;
+ }
+
+ if ( dummySpan )
+ {
if ( bIsStartMakerAlone )
{
- // Move the selection start to include the temporary .
+ // Move the selection start to include the temporary .
oIERange.moveStart( 'character', -1 ) ;
oIERange.select() ;
@@ -156,12 +164,6 @@
FCKDomTools.RemoveNode( dummySpan ) ;
}
- else
- {
- this._Range.setEndBefore( eEndMarker ) ;
- eEndMarker.parentNode.removeChild( eEndMarker ) ;
- oIERange.select() ;
- }
}
FCKDomRange.prototype._GetSelectionMarkerTag = function( toStart )