Fix for bug #65857: Trailing whitespaces confuse form field value
Modified SetTextControlFrameState() to use GetTextControlFrameState() when comparing the current value. r=akkana@netscape.com sr=sfraser@netscape.com git-svn-id: svn://10.0.0.236/trunk@85863 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
bb801e7c32
commit
e8d448c157
@ -2991,8 +2991,7 @@ nsGfxTextControlFrame2::SetTextControlFrameState(const nsAReadableString& aValue
|
||||
if (mEditor && mUseEditor)
|
||||
{
|
||||
nsAutoString currentValue;
|
||||
nsAutoString format; format.AssignWithConversion("text/plain");
|
||||
nsresult rv = mEditor->OutputToString(currentValue, format, 0);
|
||||
GetTextControlFrameState(currentValue);
|
||||
if (PR_TRUE==IsSingleLineTextControl()) {
|
||||
RemoveNewlines(currentValue);
|
||||
}
|
||||
@ -3015,7 +3014,7 @@ nsGfxTextControlFrame2::SetTextControlFrameState(const nsAReadableString& aValue
|
||||
nsFormControlHelper::PlatformToDOMLineBreaks(currentValue);
|
||||
|
||||
nsCOMPtr<nsIDOMDocument>domDoc;
|
||||
rv = mEditor->GetDocument(getter_AddRefs(domDoc));
|
||||
nsresult rv = mEditor->GetDocument(getter_AddRefs(domDoc));
|
||||
if (NS_FAILED(rv)) return;
|
||||
if (!domDoc) return;
|
||||
mSelCon->SelectAll();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user