mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-07 16:28:38 +09:00
Issue #2135 - Bug 1413102 (Follow-up): Ignore current target because of shadow DOM retargeting
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1466581
This commit is contained in:
parent
24572438a0
commit
1bb2009f61
3 changed files with 18 additions and 4 deletions
|
|
@ -872,6 +872,7 @@ EventDispatcher::Dispatch(nsISupports* aTarget,
|
|||
preVisitor.mTargetInKnownToBeHandledScope = preVisitor.mEvent->mTarget;
|
||||
topEtci = parentEtci;
|
||||
} else {
|
||||
bool ignoreBecauseOfShadowDOM = preVisitor.mIgnoreBecauseOfShadowDOM;
|
||||
nsCOMPtr<nsINode> disabledTarget = do_QueryInterface(parentTarget);
|
||||
parentEtci = MayRetargetToChromeIfCanNotHandleEvent(chain,
|
||||
preVisitor,
|
||||
|
|
@ -882,7 +883,11 @@ EventDispatcher::Dispatch(nsISupports* aTarget,
|
|||
preVisitor.mTargetInKnownToBeHandledScope = preVisitor.mEvent->mTarget;
|
||||
EventTargetChainItem* item =
|
||||
EventTargetChainItem::GetFirstCanHandleEventTarget(chain);
|
||||
item->SetNewTarget(parentTarget);
|
||||
if (!ignoreBecauseOfShadowDOM) {
|
||||
// If we ignored the target because of Shadow DOM retargeting, we
|
||||
// shouldn't treat the target to be in the event path at all.
|
||||
item->SetNewTarget(parentTarget);
|
||||
}
|
||||
topEtci = parentEtci;
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue