Commit 255894c1 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Override default onsubmit action with our submit implementation.

parent b2962fb8
......@@ -218,7 +218,7 @@ static const event_info_t event_info[] = {
{selectstartW, onselectstartW, EVENTT_MOUSE, DISPID_EVMETH_ONSELECTSTART,
EVENT_CANCELABLE},
{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)
......
......@@ -714,12 +714,24 @@ static HRESULT HTMLFormElement_invoke(HTMLDOMNode *iface,
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 = {
HTMLFormElement_QI,
HTMLElement_destructor,
HTMLElement_cpc,
HTMLElement_clone,
HTMLElement_handle_event,
HTMLFormElement_handle_event,
HTMLElement_get_attr_col,
NULL,
NULL,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment