mshtml: Use nsIDOMEvent directly to prevent default event handling in dispatch_event_object.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2018-03-08 08:56:28 -06:00 committed by Alexandre Julliard
parent 57c2c9136f
commit 39766bcded
1 changed files with 3 additions and 3 deletions

View File

@ -2593,8 +2593,8 @@ static HRESULT dispatch_event_object(EventTarget *event_target, DOMEvent *event,
}
if(event->event_id != EVENTID_LAST && (event_info[event->event_id].flags & EVENT_HASDEFAULTHANDLERS)) {
for(i = 0; !event->prevent_default && i < chain_cnt; i++) {
BOOL prevent_default = FALSE;
BOOL prevent_default = event->prevent_default;
for(i = 0; !prevent_default && i < chain_cnt; i++) {
vtbl = dispex_get_vtbl(&target_chain[i]->dispex);
if(!vtbl || !vtbl->handle_event_default)
continue;
@ -2603,7 +2603,7 @@ static HRESULT dispatch_event_object(EventTarget *event_target, DOMEvent *event,
if(FAILED(hres) || event->stop_propagation)
break;
if(prevent_default)
IDOMEvent_preventDefault(&event->IDOMEvent_iface);
nsIDOMEvent_PreventDefault(event->nsevent);
}
}