Fix range.surroundContents() to not rearrange the content order. Bug 191625,

r=sicking, sr=peterv
This commit is contained in:
bzbarsky%mit.edu 2003-04-02 01:30:33 +00:00
parent f1ff5d1436
commit 0aa30bfa1d

View File

@ -2208,7 +2208,7 @@ nsresult nsRange::SurroundContents(nsIDOMNode* aN)
if(tFound)
{
nsCOMPtr<nsIDOMNode> tChild;
tChildList->Item(i-1, getter_AddRefs(tChild));
tChildList->Item(i, getter_AddRefs(tChild));
tAncestorContainer->InsertBefore(aN, tChild, getter_AddRefs(tempNode));
}
else // there is an error this may need to be updated later