diff --git a/mozilla/editor/base/nsHTMLEditRules.cpp b/mozilla/editor/base/nsHTMLEditRules.cpp
index 5967cd684df..d1d35abed27 100644
--- a/mozilla/editor/base/nsHTMLEditRules.cpp
+++ b/mozilla/editor/base/nsHTMLEditRules.cpp
@@ -739,7 +739,7 @@ nsHTMLEditRules::WillDeleteSelection(nsIDOMSelection *aSelection,
nsCOMPtr topParent;
nextNode->GetParentNode(getter_AddRefs(topParent));
*aHandled = PR_TRUE;
- res = JoinNodesSmart(nextNode,node,&selNode,&selOffset);
+ res = JoinNodesSmart(node,nextNode,&selNode,&selOffset);
if (NS_FAILED(res)) return res;
// fix up selection
res = aSelection->Collapse(selNode,selOffset);
diff --git a/mozilla/editor/libeditor/html/nsHTMLEditRules.cpp b/mozilla/editor/libeditor/html/nsHTMLEditRules.cpp
index 5967cd684df..d1d35abed27 100644
--- a/mozilla/editor/libeditor/html/nsHTMLEditRules.cpp
+++ b/mozilla/editor/libeditor/html/nsHTMLEditRules.cpp
@@ -739,7 +739,7 @@ nsHTMLEditRules::WillDeleteSelection(nsIDOMSelection *aSelection,
nsCOMPtr topParent;
nextNode->GetParentNode(getter_AddRefs(topParent));
*aHandled = PR_TRUE;
- res = JoinNodesSmart(nextNode,node,&selNode,&selOffset);
+ res = JoinNodesSmart(node,nextNode,&selNode,&selOffset);
if (NS_FAILED(res)) return res;
// fix up selection
res = aSelection->Collapse(selNode,selOffset);