mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 05:09:12 +00:00
LibWeb: Fire a pointer event on synthetic clicks
This commit is contained in:
parent
1e2ddf9848
commit
db0519ddc1
Notes:
sideshowbarker
2024-07-17 22:55:25 +09:00
Author: https://github.com/shannonbooth
Commit: db0519ddc1
Pull-request: https://github.com/SerenityOS/serenity/pull/23886
Reviewed-by: https://github.com/kennethmyhra ✅
3 changed files with 18 additions and 3 deletions
|
@ -381,8 +381,7 @@ bool HTMLElement::fire_a_synthetic_pointer_event(FlyString const& type, DOM::Ele
|
|||
{
|
||||
// 1. Let event be the result of creating an event using PointerEvent.
|
||||
// 2. Initialize event's type attribute to e.
|
||||
// FIXME: Actually create a PointerEvent!
|
||||
auto event = UIEvents::MouseEvent::create(realm(), type);
|
||||
auto event = UIEvents::PointerEvent::create(realm(), type);
|
||||
|
||||
// 3. Initialize event's bubbles and cancelable attributes to true.
|
||||
event->set_bubbles(true);
|
||||
|
@ -419,7 +418,7 @@ void HTMLElement::click()
|
|||
// 3. Set this element's click in progress flag.
|
||||
m_click_in_progress = true;
|
||||
|
||||
// FIXME: 4. Fire a synthetic pointer event named click at this element, with the not trusted flag set.
|
||||
// 4. Fire a synthetic pointer event named click at this element, with the not trusted flag set.
|
||||
fire_a_synthetic_pointer_event(HTML::EventNames::click, *this, true);
|
||||
|
||||
// 5. Unset this element's click in progress flag.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue