diff --git a/mozilla/editor/base/nsHTMLEditRules.cpp b/mozilla/editor/base/nsHTMLEditRules.cpp
index 36d880cabdb..0677470009e 100644
--- a/mozilla/editor/base/nsHTMLEditRules.cpp
+++ b/mozilla/editor/base/nsHTMLEditRules.cpp
@@ -3729,14 +3729,6 @@ nsHTMLEditRules::ShouldMakeEmptyBlock(nsIDOMSelection *aSelection,
}
}
- // are we in a textnode or inline node?
- if (!nsEditor::IsBlockNode(parent))
- {
- // we must be in a text or inline node - convert existing block
- *outMakeEmpty = PR_FALSE;
- return res;
- }
-
// is it after a
with no inline nodes after it, or a
after it??
if (offset)
{
@@ -3771,6 +3763,15 @@ nsHTMLEditRules::ShouldMakeEmptyBlock(nsIDOMSelection *aSelection,
}
}
}
+
+ // are we in a textnode or inline node?
+ if (!nsEditor::IsBlockNode(parent))
+ {
+ // we must be in a text or inline node - convert existing block
+ *outMakeEmpty = PR_FALSE;
+ return res;
+ }
+
}
// otherwise transform an existing block
*outMakeEmpty = PR_FALSE;
diff --git a/mozilla/editor/libeditor/html/nsHTMLEditRules.cpp b/mozilla/editor/libeditor/html/nsHTMLEditRules.cpp
index 36d880cabdb..0677470009e 100644
--- a/mozilla/editor/libeditor/html/nsHTMLEditRules.cpp
+++ b/mozilla/editor/libeditor/html/nsHTMLEditRules.cpp
@@ -3729,14 +3729,6 @@ nsHTMLEditRules::ShouldMakeEmptyBlock(nsIDOMSelection *aSelection,
}
}
- // are we in a textnode or inline node?
- if (!nsEditor::IsBlockNode(parent))
- {
- // we must be in a text or inline node - convert existing block
- *outMakeEmpty = PR_FALSE;
- return res;
- }
-
// is it after a
with no inline nodes after it, or a
after it??
if (offset)
{
@@ -3771,6 +3763,15 @@ nsHTMLEditRules::ShouldMakeEmptyBlock(nsIDOMSelection *aSelection,
}
}
}
+
+ // are we in a textnode or inline node?
+ if (!nsEditor::IsBlockNode(parent))
+ {
+ // we must be in a text or inline node - convert existing block
+ *outMakeEmpty = PR_FALSE;
+ return res;
+ }
+
}
// otherwise transform an existing block
*outMakeEmpty = PR_FALSE;