Index: /FCKeditor/branches/features/floating_dialog/editor/_source/classes/fckstyle.js
===================================================================
--- /FCKeditor/branches/features/floating_dialog/editor/_source/classes/fckstyle.js	(revision 1352)
+++ /FCKeditor/branches/features/floating_dialog/editor/_source/classes/fckstyle.js	(revision 1353)
@@ -95,5 +95,5 @@
 	 * Apply the style to a FCKDomRange.
 	 */
-	ApplyToRange : function( range, selectIt )
+	ApplyToRange : function( range, selectIt, updateRange )
 	{
 		// ApplyToRange is not valid for FCK_STYLE_OBJECT types.
@@ -112,5 +112,5 @@
 		}
 
-		return this.ApplyToRange( range, selectIt ) ;
+		return this.ApplyToRange( range, selectIt, updateRange ) ;
 	},
 
@@ -142,5 +142,5 @@
 	 * effect.
 	 */
-	RemoveFromRange : function( range, selectIt )
+	RemoveFromRange : function( range, selectIt, updateRange )
 	{
 		var bookmark ;
@@ -276,5 +276,6 @@
 				range.SelectBookmark( bookmark ) ;
 
-			return bookmark ;
+			if ( updateRange )
+				range.MoveToBookmark( bookmark ) ;
 		}
 
@@ -402,5 +403,6 @@
 			range.SelectBookmark( bookmark ) ;
 
-		return bookmark ;
+		if ( updateRange )
+			range.MoveToBookmark( bookmark ) ;
 	},
 
@@ -750,5 +752,5 @@
 	 *	- Properly handle block containers like <div> and <blockquote>.
 	 */
-	_ApplyBlockStyle : function( range, selectIt )
+	_ApplyBlockStyle : function( range, selectIt, updateRange )
 	{
 		// Bookmark the range so we can re-select it after processing.
@@ -777,4 +779,7 @@
 		if ( selectIt )
 			range.SelectBookmark( bookmark ) ;
+
+		if ( updateRange )
+			range.MoveToBookmark( range ) ;
 	},
 
@@ -789,5 +794,5 @@
 	 *        <span style="color: #ff0000;"><span style="background-color: #ffffff">XYZ</span></span>
 	 */
-	_ApplyInlineStyle : function( range, selectIt )
+	_ApplyInlineStyle : function( range, selectIt, updateRange )
 	{
 		var doc = range.Window.document ;
@@ -971,5 +976,6 @@
 			range.SelectBookmark( bookmark ) ;
 
-		return bookmark ;
+		if ( updateRange )
+			range.MoveToBookmark( bookmark ) ;
 	},
 
Index: /FCKeditor/branches/features/floating_dialog/editor/dialog/fck_replace.html
===================================================================
--- /FCKeditor/branches/features/floating_dialog/editor/dialog/fck_replace.html	(revision 1352)
+++ /FCKeditor/branches/features/floating_dialog/editor/dialog/fck_replace.html	(revision 1353)
@@ -64,7 +64,7 @@
 	if ( HighlightRange )
 		ClearHighlight() ;
-	var bookmark = oEditor.FCKStyles.GetStyle( '_FCK_SelectionHighlight' ).ApplyToRange( GlobalRange.Clone() ) ;
-	HighlightRange = new oEditor.FCKDomRange( oEditor.FCK.EditorWindow ) ;
-	HighlightRange.MoveToBookmark( bookmark ) ;
+	var cloneRange = GlobalRange.Clone() ;
+	oEditor.FCKStyles.GetStyle( '_FCK_SelectionHighlight' ).ApplyToRange( cloneRange, false, true ) ;
+	HighlightRange = cloneRange ;
 	GlobalRange = HighlightRange.Clone() ;
 }
@@ -74,7 +74,5 @@
 	if ( HighlightRange )
 	{
-		var bookmark = oEditor.FCKStyles.GetStyle( '_FCK_SelectionHighlight' ).RemoveFromRange( HighlightRange ) ;
-		var dummyRange = new oEditor.FCKDomRange( oEditor.FCK.EditorWindow ) ;
-		dummyRange.MoveToBookmark( bookmark ) ;
+		var bookmark = oEditor.FCKStyles.GetStyle( '_FCK_SelectionHighlight' ).RemoveFromRange( HighlightRange, false, true ) ;
 		HighlightRange = null ;
 	}
