LibWeb: Restore event characteristics of MouseEvents and WheelEvents

These were accidentally no longer set after
2c396b5378
This commit is contained in:
circl 2024-07-16 15:05:15 +02:00 committed by Alexander Kalenik
parent 5eeb5eb36e
commit f20010c1d3
Notes: sideshowbarker 2024-07-17 07:14:29 +09:00
2 changed files with 6 additions and 0 deletions
Userland/Libraries/LibWeb/UIEvents

View file

@ -144,6 +144,9 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<MouseEvent>> MouseEvent::create_from_platfo
event_init.buttons = buttons;
auto event = MouseEvent::create(realm, event_name, event_init, page.x().to_double(), page.y().to_double(), offset.x().to_double(), offset.y().to_double());
event->set_is_trusted(true);
event->set_bubbles(true);
event->set_cancelable(true);
event->set_composed(true);
return event;
}

View file

@ -61,6 +61,9 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<WheelEvent>> WheelEvent::create_from_platfo
event_init.delta_mode = WheelDeltaMode::DOM_DELTA_PIXEL;
auto event = WheelEvent::create(realm, event_name, event_init, page.x().to_double(), page.y().to_double(), offset.x().to_double(), offset.y().to_double());
event->set_is_trusted(true);
event->set_bubbles(true);
event->set_cancelable(true);
event->set_composed(true);
return event;
}