mirror of
https://github.com/reactos/wine.git
synced 2024-12-13 22:58:37 +00:00
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,
|
||||
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,
|
||||
|
Loading…
Reference in New Issue
Block a user