mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:58:11 +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
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