mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Add auxiliary method to EventTargetHelpers for events without target
fixup! Add auxiliary method to EventTargetHelpers for events without target
This commit is contained in:
parent
1bc2c8a639
commit
79487252ca
7 changed files with 21 additions and 15 deletions
|
@ -1262,7 +1262,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();
|
||||
|
@ -1271,10 +1271,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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue