Skip to content

Commit 1070193

Browse files
committed
[ComponentManager] Implement Logical Component Bubbling for Event Path Resolution #8050
1 parent 85bd328 commit 1070193

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

src/manager/Component.mjs

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -360,11 +360,21 @@ class Component extends Manager {
360360
let me = this,
361361
componentPath = [],
362362
i = 0,
363-
len = path?.length || 0;
363+
len = path?.length || 0,
364+
component, id;
364365

365366
for (; i < len; i++) {
366-
if (me.has(path[i]) || me.wrapperNodes.get(path[i])) {
367-
componentPath.push(path[i])
367+
id = path[i];
368+
369+
if (me.has(id) || me.wrapperNodes.get(id)) {
370+
component = me.get(id);
371+
372+
while (component) {
373+
componentPath.push(component.id);
374+
component = component.parent
375+
}
376+
377+
break
368378
}
369379
}
370380

0 commit comments

Comments
 (0)