Index: FCKeditor/trunk/_whatsnew.html
===================================================================
--- FCKeditor/trunk/_whatsnew.html	(revision 1546)
+++ FCKeditor/trunk/_whatsnew.html	(revision 1558)
@@ -100,4 +100,7 @@
 			will no longer display wrong starting positions for the match when there are multiple and identical
 	       		characters preceding the character at the real starting point of the match.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1878">#1878</a>] Fixed a JavaScript error
+			which occurs in the Find/Replace dialog when the user presses "Find" or "Replace" after the "No
+			match found" message has appeared.</li>
 	</ul>
 	<p>
Index: FCKeditor/trunk/editor/dialog/fck_replace.html
===================================================================
--- FCKeditor/trunk/editor/dialog/fck_replace.html	(revision 1546)
+++ FCKeditor/trunk/editor/dialog/fck_replace.html	(revision 1558)
@@ -55,7 +55,12 @@
 // This will be the starting point of our search.
 var GlobalRange = new oEditor.FCKDomRange( oEditor.FCK.EditorWindow ) ;
-GlobalRange.SetStart( oEditor.FCK.EditorDocument.body, 1 ) ;
-GlobalRange.SetEnd( oEditor.FCK.EditorDocument.body, 1 ) ;
-GlobalRange.Collapse( true ) ;
+
+function ResetGlobalRange()
+{
+	GlobalRange.SetStart( oEditor.FCK.EditorDocument.body, 1 ) ;
+	GlobalRange.SetEnd( oEditor.FCK.EditorDocument.body, 1 ) ;
+	GlobalRange.Collapse( true ) ;
+}
+ResetGlobalRange() ;
 
 var HighlightRange = null ;
@@ -389,8 +394,11 @@
 		}
 
-		return true;
+		return true ;
 	}
 	else
-		return false;
+	{
+		ResetGlobalRange() ;
+		return false ;
+	}
 }
 
