зеркало из https://github.com/mozilla/gecko-dev.git
fix for 119053: backspace/delete can delete two br's instead of one. r=fm; sr=kin
This commit is contained in:
Родитель
562f19db57
Коммит
0aa67c8c58
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче