Bug 607584 - CR in a paragraph with an id attribute creates a second paragraph of same id; r=ehsan a=roc

This commit is contained in:
Daniel Glazman 2010-10-29 12:35:27 -04:00
parent 8c00ec8852
commit ac5d79b1f8

View File

@ -6678,7 +6678,12 @@ nsHTMLEditRules::SplitParagraph(nsIDOMNode *aPara,
res = mHTMLEditor->DeleteNode(aBRNode);
NS_ENSURE_SUCCESS(res, res);
}
// remove ID attribute on the paragraph we just created
nsCOMPtr<nsIDOMElement> rightElt = do_QueryInterface(rightPara);
res = mHTMLEditor->RemoveAttribute(rightElt, NS_LITERAL_STRING("id"));
NS_ENSURE_SUCCESS(res, res);
// check both halves of para to see if we need mozBR
res = InsertMozBRIfNeeded(leftPara);
NS_ENSURE_SUCCESS(res, res);