Fire the OnSubmit event on the form not the input field...
git-svn-id: svn://10.0.0.236/trunk@16911 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -208,11 +208,18 @@ void
|
||||
nsTextControlFrame::EnterPressed(nsIPresContext& aPresContext)
|
||||
{
|
||||
if (mFormFrame && mFormFrame->CanSubmit(*this)) {
|
||||
nsEventStatus mStatus = nsEventStatus_eIgnore;
|
||||
nsEvent event;
|
||||
event.eventStructType = NS_EVENT;
|
||||
event.message = NS_FORM_SUBMIT;
|
||||
mContent->HandleDOMEvent(aPresContext, &event, nsnull, DOM_EVENT_INIT, mStatus);
|
||||
nsIContent *formContent = nsnull;
|
||||
|
||||
mFormFrame->GetContent(formContent);
|
||||
if (nsnull != formContent) {
|
||||
nsEvent event;
|
||||
nsEventStatus status = nsEventStatus_eIgnore;
|
||||
|
||||
event.eventStructType = NS_EVENT;
|
||||
event.message = NS_FORM_SUBMIT;
|
||||
formContent->HandleDOMEvent(aPresContext, &event, nsnull, DOM_EVENT_INIT, status);
|
||||
NS_RELEASE(formContent);
|
||||
}
|
||||
|
||||
mFormFrame->OnSubmit(&aPresContext, this);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user