diff --git a/editor/libeditor/html/nsWSRunObject.cpp b/editor/libeditor/html/nsWSRunObject.cpp
index a5c55570d39..d05fa20cfb3 100644
--- a/editor/libeditor/html/nsWSRunObject.cpp
+++ b/editor/libeditor/html/nsWSRunObject.cpp
@@ -1411,7 +1411,7 @@ nsWSRunObject::PrepareToDeleteRangePriv(nsWSRunObject* aEndObject)
res = DeleteChars(beforeRun->mStartNode, beforeRun->mStartOffset, mNode, mOffset);
NS_ENSURE_SUCCESS(res, res);
}
- else if (beforeRun && (beforeRun->mType == eNormalWS) && mPRE)
+ else if (beforeRun && (beforeRun->mType == eNormalWS) && !mPRE)
{
if ( (afterRun && (afterRun->mType == eTrailingWS)) ||
(afterRun && (afterRun->mType == eNormalWS)) ||