LibWeb: Restore event characteristics of MouseEvents and WheelEvents
These were accidentally no longer set after
2c396b5378
This commit is contained in:
parent
5eeb5eb36e
commit
f20010c1d3
Notes:
sideshowbarker
2024-07-17 07:14:29 +09:00
Author: https://github.com/circl-lastname Commit: https://github.com/LadybirdBrowser/ladybird/commit/f20010c1d3 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/667 Issue: https://github.com/LadybirdBrowser/ladybird/issues/660 Reviewed-by: https://github.com/kalenikaliaksandr ✅
2 changed files with 6 additions and 0 deletions
Userland/Libraries/LibWeb/UIEvents
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue