mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 02:57:38 +00:00
Fire onchange event when a file is selected from the filepicker. Bug 67873,
r+sr=peterv
This commit is contained in:
parent
172b44ad4e
commit
c0de956a63
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user