fix for 119053: backspace/delete can delete two br's instead of one. r=fm; sr=kin

This commit is contained in:
jfrancis%netscape.com 2002-01-10 00:29:04 +00:00
Родитель 562f19db57
Коммит 0aa67c8c58
1 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -1643,8 +1643,8 @@ nsHTMLEditRules::WillDeleteSelection(nsISelection *aSelection,
sibling->GetNextSibling(getter_AddRefs(stepbrother));
if (startNode == stepbrother)
{
// are they same type?
if (mHTMLEditor->IsTextNode(stepbrother))
// are they both text nodes?
if (mHTMLEditor->IsTextNode(startNode) && mHTMLEditor->IsTextNode(sibling))
{
// if so, join them!
res = JoinNodesSmart(sibling, startNode, address_of(selNode), &selOffset);
@ -1775,8 +1775,8 @@ nsHTMLEditRules::WillDeleteSelection(nsISelection *aSelection,
sibling->GetPreviousSibling(getter_AddRefs(stepbrother));
if (startNode == stepbrother)
{
// are they same type?
if (mHTMLEditor->IsTextNode(sibling))
// are they both text nodes?
if (mHTMLEditor->IsTextNode(startNode) && mHTMLEditor->IsTextNode(sibling))
{
// if so, join them!
res = JoinNodesSmart(startNode, sibling, address_of(selNode), &selOffset);