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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user