auto merge of #4374 : thiagopnts/servo/dispatch-event, r=Ms2ger

servo/pull/4369 with the right commit.
This commit is contained in:
bors-servo 2014-12-16 06:36:47 -07:00
commit 746b262ff4
7 changed files with 21 additions and 15 deletions

View file

@ -1381,7 +1381,7 @@ impl<'a> ActivationElementHelpers<'a> for JSRef<'a, Element> {
Some(elem) => {
// Step 5-6
elem.pre_click_activation();
target.dispatch_event_with_target(None, event).ok();
target.dispatch_event(event);
if !event.DefaultPrevented() {
// post click activation
elem.activation_behavior();
@ -1390,10 +1390,10 @@ impl<'a> ActivationElementHelpers<'a> for JSRef<'a, Element> {
}
}
// Step 6
None => {target.dispatch_event_with_target(None, event).ok();}
None => {target.dispatch_event(event);}
},
// Step 6
None => {target.dispatch_event_with_target(None, event).ok();}
None => {target.dispatch_event(event);}
}
// Step 7
self.set_click_in_progress(false);