mshtml: Override default onsubmit action with our submit implementation.
This commit is contained in:
parent
b2962fb87e
commit
255894c1f1
|
@ -218,7 +218,7 @@ static const event_info_t event_info[] = {
|
||||||
{selectstartW, onselectstartW, EVENTT_MOUSE, DISPID_EVMETH_ONSELECTSTART,
|
{selectstartW, onselectstartW, EVENTT_MOUSE, DISPID_EVMETH_ONSELECTSTART,
|
||||||
EVENT_CANCELABLE},
|
EVENT_CANCELABLE},
|
||||||
{submitW, onsubmitW, EVENTT_HTML, DISPID_EVMETH_ONSUBMIT,
|
{submitW, onsubmitW, EVENTT_HTML, DISPID_EVMETH_ONSUBMIT,
|
||||||
EVENT_DEFAULTLISTENER|EVENT_BUBBLE|EVENT_CANCELABLE}
|
EVENT_DEFAULTLISTENER|EVENT_BUBBLE|EVENT_CANCELABLE|EVENT_HASDEFAULTHANDLERS}
|
||||||
};
|
};
|
||||||
|
|
||||||
eventid_t str_to_eid(LPCWSTR str)
|
eventid_t str_to_eid(LPCWSTR str)
|
||||||
|
|
|
@ -714,12 +714,24 @@ static HRESULT HTMLFormElement_invoke(HTMLDOMNode *iface,
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static HRESULT HTMLFormElement_handle_event(HTMLDOMNode *iface, eventid_t eid, nsIDOMEvent *event, BOOL *prevent_default)
|
||||||
|
{
|
||||||
|
HTMLFormElement *This = impl_from_HTMLDOMNode(iface);
|
||||||
|
|
||||||
|
if(eid == EVENTID_SUBMIT) {
|
||||||
|
*prevent_default = TRUE;
|
||||||
|
return IHTMLFormElement_submit(&This->IHTMLFormElement_iface);
|
||||||
|
}
|
||||||
|
|
||||||
|
return HTMLElement_handle_event(&This->element.node, eid, event, prevent_default);
|
||||||
|
}
|
||||||
|
|
||||||
static const NodeImplVtbl HTMLFormElementImplVtbl = {
|
static const NodeImplVtbl HTMLFormElementImplVtbl = {
|
||||||
HTMLFormElement_QI,
|
HTMLFormElement_QI,
|
||||||
HTMLElement_destructor,
|
HTMLElement_destructor,
|
||||||
HTMLElement_cpc,
|
HTMLElement_cpc,
|
||||||
HTMLElement_clone,
|
HTMLElement_clone,
|
||||||
HTMLElement_handle_event,
|
HTMLFormElement_handle_event,
|
||||||
HTMLElement_get_attr_col,
|
HTMLElement_get_attr_col,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
|
|
Loading…
Reference in New Issue