fixed bug 13810 by removing an extraneous check for empty string. empty strings are perfectly legal

in WillInsertText
This commit is contained in:
buster%netscape.com 1999-09-15 19:43:19 +00:00
parent 673ff30a88
commit e52e18ffbf
2 changed files with 16 additions and 24 deletions

View File

@ -282,21 +282,17 @@ nsTextEditRules::WillInsertText(nsIDOMSelection *aSelection,
res = TruncateInsertionIfNeeded(aSelection, aInString, aOutString, aMaxLength);
if (NS_FAILED(res)) return res;
if (aOutString->Length())
// handle password field docs
if (mFlags & nsIHTMLEditor::eEditorPasswordMask)
{
// handle password field docs
if (mFlags & nsIHTMLEditor::eEditorPasswordMask)
{
res = EchoInsertionToPWBuff(aSelection, aOutString);
if (NS_FAILED(res)) return res;
}
// do text insertion
PRBool bCancel;
res = DoTextInsertion(aSelection, &bCancel, aTxn, aOutString, aTypeInState);
res = EchoInsertionToPWBuff(aSelection, aOutString);
if (NS_FAILED(res)) return res;
}
// do text insertion
PRBool bCancel;
res = DoTextInsertion(aSelection, &bCancel, aTxn, aOutString, aTypeInState);
return res;
}

View File

@ -282,21 +282,17 @@ nsTextEditRules::WillInsertText(nsIDOMSelection *aSelection,
res = TruncateInsertionIfNeeded(aSelection, aInString, aOutString, aMaxLength);
if (NS_FAILED(res)) return res;
if (aOutString->Length())
// handle password field docs
if (mFlags & nsIHTMLEditor::eEditorPasswordMask)
{
// handle password field docs
if (mFlags & nsIHTMLEditor::eEditorPasswordMask)
{
res = EchoInsertionToPWBuff(aSelection, aOutString);
if (NS_FAILED(res)) return res;
}
// do text insertion
PRBool bCancel;
res = DoTextInsertion(aSelection, &bCancel, aTxn, aOutString, aTypeInState);
res = EchoInsertionToPWBuff(aSelection, aOutString);
if (NS_FAILED(res)) return res;
}
// do text insertion
PRBool bCancel;
res = DoTextInsertion(aSelection, &bCancel, aTxn, aOutString, aTypeInState);
return res;
}