Fire onchange event when a file is selected from the filepicker. Bug 67873,

r+sr=peterv


git-svn-id: svn://10.0.0.236/trunk@152977 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzbarsky%mit.edu
2004-02-19 22:13:47 +00:00
parent fed1bb3ece
commit ec79b3d7ab
2 changed files with 10 additions and 0 deletions

View File

@@ -317,6 +317,9 @@ nsFileControlFrame::MouseClick(nsIDOMEvent* aMouseEvent)
}
}
// Tell our textframe to remember the currently focused value
mTextFrame->InitFocusedValue();
// Open dialog
PRInt16 mode;
result = filePicker->Show(&mode);
@@ -338,6 +341,8 @@ nsFileControlFrame::MouseClick(nsIDOMEvent* aMouseEvent)
result = localFile->GetPath(unicodePath);
if (!unicodePath.IsEmpty()) {
mTextFrame->SetProperty(mPresContext, nsHTMLAtoms::value, unicodePath);
// May need to fire an onchange here
mTextFrame->CheckFireOnChange();
return NS_OK;
}
}