Fire onchange event when a file is selected from the filepicker. Bug 67873,
r+sr=peterv
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user