fix for bug# 50847 (regression)

r=kin


git-svn-id: svn://10.0.0.236/trunk@77676 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
anthonyd%netscape.com 2000-08-30 23:38:26 +00:00
parent 8e86a5b447
commit 294024ffbd

View File

@ -2906,7 +2906,10 @@ nsGfxTextControlFrame2::SetTextControlFrameState(const nsAReadableString& aValue
flags &= ~(nsIHTMLEditor::eEditorDisabledMask);
flags &= ~(nsIHTMLEditor::eEditorReadonlyMask);
mEditor->SetFlags(flags);
htmlEditor->InsertText(currentValue);
if (currentValue.Length() < 1)
mEditor->DeleteSelection(nsIEditor::eNone);
else
htmlEditor->InsertText(currentValue);
mEditor->SetFlags(savedFlags);
if (domSel)
domSel->EndBatchChanges();