Fix for bug #90499: Can't delete selection if end of selection contains "<br>\n"

Modified nsHTMLEditRules::WillDeleteSelection() so that it uses
an nsAutoTxnsConserveSelection auto-variable to prevent the
call to nsWSRunObject::PrepareToDeleteRange() from changing
the selection.

r=brade@netscape.com  sr=waterson@netscape.com
This commit is contained in:
kin%netscape.com 2001-07-18 21:22:31 +00:00
Родитель 817251bf30
Коммит bc9b8572bb
2 изменённых файлов: 2 добавлений и 0 удалений

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

@ -1847,6 +1847,7 @@ nsHTMLEditRules::WillDeleteSelection(nsISelection *aSelection,
// adjust surrounding whitespace in preperation to delete selection
if (!bPlaintext)
{
nsAutoTxnsConserveSelection dontSpazMySelection(mHTMLEditor);
res = nsWSRunObject::PrepareToDeleteRange(mHTMLEditor,
address_of(startNode), &startOffset,
address_of(endNode), &endOffset);

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

@ -1847,6 +1847,7 @@ nsHTMLEditRules::WillDeleteSelection(nsISelection *aSelection,
// adjust surrounding whitespace in preperation to delete selection
if (!bPlaintext)
{
nsAutoTxnsConserveSelection dontSpazMySelection(mHTMLEditor);
res = nsWSRunObject::PrepareToDeleteRange(mHTMLEditor,
address_of(startNode), &startOffset,
address_of(endNode), &endOffset);