restoring 1.54 checkin: no longer clearing selection when we detect empty document - selection is a perfectly valid concept in an empty document.

This commit is contained in:
jfrancis%netscape.com 1999-09-08 05:30:48 +00:00
parent 61548af51a
commit 9c28b6ac69
2 changed files with 0 additions and 4 deletions

View File

@ -217,8 +217,6 @@ nsTextEditRules::WillInsert(nsIDOMSelection *aSelection, PRBool *aCancel)
{ {
mEditor->DeleteNode(mBogusNode); mEditor->DeleteNode(mBogusNode);
mBogusNode = do_QueryInterface(nsnull); mBogusNode = do_QueryInterface(nsnull);
// there is no longer any legit selection, so clear it.
aSelection->ClearSelection();
} }
return NS_OK; return NS_OK;

View File

@ -217,8 +217,6 @@ nsTextEditRules::WillInsert(nsIDOMSelection *aSelection, PRBool *aCancel)
{ {
mEditor->DeleteNode(mBogusNode); mEditor->DeleteNode(mBogusNode);
mBogusNode = do_QueryInterface(nsnull); mBogusNode = do_QueryInterface(nsnull);
// there is no longer any legit selection, so clear it.
aSelection->ClearSelection();
} }
return NS_OK; return NS_OK;