mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-08 18:46:03 +00:00
LibWeb: Check target's root instead of target itself in EventDispatcher
This was accidentally missing ".root()": "or parent is a node and target’s _root_ is a shadow-including inclusive ancestor of parent" https://dom.spec.whatwg.org/#concept-event-dispatch Step 5.9.6
This commit is contained in:
parent
f7f37eaa0f
commit
b275b8c87a
Notes:
sideshowbarker
2024-07-18 04:51:21 +09:00
Author: https://github.com/Lubrsi
Commit: b275b8c87a
Pull-request: https://github.com/SerenityOS/serenity/pull/9754
1 changed files with 1 additions and 1 deletions
|
@ -202,7 +202,7 @@ bool EventDispatcher::dispatch(NonnullRefPtr<EventTarget> target, NonnullRefPtr<
|
|||
}
|
||||
|
||||
if (is<Window>(parent)
|
||||
|| (is<Node>(parent) && verify_cast<Node>(*target).is_shadow_including_inclusive_ancestor_of(verify_cast<Node>(*parent)))) {
|
||||
|| (is<Node>(parent) && verify_cast<Node>(*target).root().is_shadow_including_inclusive_ancestor_of(verify_cast<Node>(*parent)))) {
|
||||
if (is_activation_event && event->bubbles() && !activation_target && parent->activation_behaviour)
|
||||
activation_target = parent;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue