Bug 322202 - "[MIDAS] hitting ENTER when focus inside an empty paragraph (containing the "I dont need it" BR tag) results in strange output." [p=littlecritter@nasquan.com (Loune) r+sr=Neil a=blocking1.9+]

This commit is contained in:
reed@reedloden.com 2008-01-26 20:17:29 -08:00
parent debe5a566d
commit b61f40d915

View File

@ -6476,7 +6476,11 @@ nsHTMLEditRules::ReturnInParagraph(nsISelection *aSelection,
PRBool newBRneeded = PR_FALSE;
nsCOMPtr<nsIDOMNode> sibling;
if (mHTMLEditor->IsTextNode(aNode))
if (aNode == aPara && doesCRCreateNewP) {
// we are at the edges of the block, newBRneeded not needed!
sibling = aNode;
}
else if (mHTMLEditor->IsTextNode(aNode))
{
nsCOMPtr<nsIDOMText> textNode = do_QueryInterface(aNode);
PRUint32 strLength;