LearnNewsExamplesServices
Frontmatter
id8051
title[DomEvent] Support Logical Ancestry in verifyDelegationPath
stateClosed
labels
enhancementaiarchitecture
assigneestobiu
createdAtDec 7, 2025, 7:14 PM
updatedAtDec 7, 2025, 7:18 PM
githubUrlhttps://github.com/neomjs/neo/issues/8051
authortobiu
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtDec 7, 2025, 7:18 PM

[DomEvent] Support Logical Ancestry in verifyDelegationPath

Closed v11.17.0 enhancementaiarchitecture
tobiu
tobiu commented on Dec 7, 2025, 7:14 PM

Update Neo.manager.DomEvent.verifyDelegationPath to support "Logical Component Bubbling".

Context: We recently updated ComponentManager.getParentPath to support logical event bubbling (traversing component.parent when the DOM hierarchy is disconnected, e.g., Portals/Proxies). This allows DomEvent.fire to find listeners on logical ancestors (like a Dashboard) even if the event target (in a DragProxy) is physically detached.

The Problem: Even though DomEvent.fire now finds the correct listener on the logical ancestor, the verifyDelegationPath check fails. This check validates that the delegation target (the element matching the delegate selector) is a descendant of the listener's component. Currently, it only checks the raw DOM path. Since the listener component (Dashboard) is not in the raw DOM path of the detached target (Proxy), the check returns false.

The Fix: Update verifyDelegationPath to perform a "Logical Ancestry Check" if the standard DOM check fails.

  1. Pass the calculated logical componentPath to verifyDelegationPath.
  2. If the DOM ancestry check fails:
    • Iterate up the DOM path starting from the delegation target.
    • Find the first component ID that exists in the logical componentPath.
    • Verify that this component is logically "below" (or same as) the listener component in the componentPath.

Impact: This ensures that event delegation (e.g., delegate: '.neo-draggable') works correctly for components that rely on logical bubbling, such as DragProxies, Modal Dialogs, and Multi-Window components.

tobiu added the enhancement label on Dec 7, 2025, 7:14 PM
tobiu added the ai label on Dec 7, 2025, 7:14 PM
tobiu added the architecture label on Dec 7, 2025, 7:14 PM
tobiu assigned to @tobiu on Dec 7, 2025, 7:14 PM
tobiu referenced in commit eab5cac - "[DomEvent] Support Logical Ancestry in verifyDelegationPath #8051" on Dec 7, 2025, 7:16 PM
tobiu closed this issue on Dec 7, 2025, 7:17 PM
tobiu reopened this issue on Dec 7, 2025, 7:17 PM