mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Short-circuit initFooEvent while dispatching events.
This commit is contained in:
parent
642a3592c7
commit
c23edf6f5a
5 changed files with 23 additions and 4 deletions
|
@ -89,6 +89,10 @@ impl<'a> UIEventMethods for JSRef<'a, UIEvent> {
|
|||
view: Option<JSRef<Window>>,
|
||||
detail: i32) {
|
||||
let event: JSRef<Event> = EventCast::from_ref(self);
|
||||
if event.dispatching() {
|
||||
return;
|
||||
}
|
||||
|
||||
event.InitEvent(type_, can_bubble, cancelable);
|
||||
self.view.assign(view);
|
||||
self.detail.set(detail);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue