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.
- Pass the calculated logical
componentPath to verifyDelegationPath.
- 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.
Update
Neo.manager.DomEvent.verifyDelegationPathto support "Logical Component Bubbling".Context: We recently updated
ComponentManager.getParentPathto support logical event bubbling (traversingcomponent.parentwhen the DOM hierarchy is disconnected, e.g., Portals/Proxies). This allowsDomEvent.fireto find listeners on logical ancestors (like a Dashboard) even if the event target (in a DragProxy) is physically detached.The Problem: Even though
DomEvent.firenow finds the correct listener on the logical ancestor, theverifyDelegationPathcheck fails. This check validates that the delegation target (the element matching thedelegateselector) 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 returnsfalse.The Fix: Update
verifyDelegationPathto perform a "Logical Ancestry Check" if the standard DOM check fails.componentPathtoverifyDelegationPath.componentPath.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.