monday.com sync: #12594190032
Bug Report Draft: Shadow DOM slot projection breaks query-based child discovery
Check existing issues
Which Component
Actual Behavior
calcite-dropdown flattens items from groups using querySelectorAll over groups. In projected-slot usage, item collection can desync and keyboard traversal may skip projected entries.
Expected Behavior
The component should track slotted child items via slot-based APIs (for example, slotchange + assignedElements with flatten as needed), so behavior remains correct when children are projected through parent Shadow DOM.
Reproduction Sample
https://codepen.io/pen?template=emzLWmy
Reproduction Version
5.2.0-next.29
Relevant Info
- OS: macOS
- Browsers: Latest Chrome and Safari
- Root cause pattern: querySelector/querySelectorAll-based child discovery misses projected children when crossing slot boundaries.
Regression?
No. Not a regression.
Priority impact
impact - p2 - want for an upcoming milestone
Impact
Breaks reliability for wrapper-component architectures that compose Calcite components through Shadow DOM projection.
Calcite package
Esri team
N/A
Reproduction Steps
- Paste sample and open dropdown.
- Navigate with ArrowDown/ArrowUp and select items.
- Check console for projected dropdown-item count.
- Observe mismatches in navigation/active item behavior.
CodePen Failure Example
Paste the following into the CodePen template to reproduce the issue pattern:
<wrapper-host id="host">
<calcite-dropdown-group>
<calcite-dropdown-item>First</calcite-dropdown-item>
<calcite-dropdown-item>Second</calcite-dropdown-item>
<calcite-dropdown-item>Third</calcite-dropdown-item>
</calcite-dropdown-group>
</wrapper-host>
<script type="module">
customElements.define("wrapper-host", class extends HTMLElement {
constructor() {
super();
const root = this.attachShadow({ mode: "open" });
root.innerHTML = `
<calcite-dropdown id="dd" open>
<calcite-action slot="trigger" text="Open" icon="chevron-down"></calcite-action>
<slot></slot>
</calcite-dropdown>
`;
}
});
const host = document.querySelector("#host");
console.log("Projected dropdown items:", host.querySelectorAll("calcite-dropdown-item").length);
</script>
monday.com sync: #12594190032
Bug Report Draft: Shadow DOM slot projection breaks query-based child discovery
Check existing issues
Which Component
Actual Behavior
calcite-dropdown flattens items from groups using querySelectorAll over groups. In projected-slot usage, item collection can desync and keyboard traversal may skip projected entries.
Expected Behavior
The component should track slotted child items via slot-based APIs (for example, slotchange + assignedElements with flatten as needed), so behavior remains correct when children are projected through parent Shadow DOM.
Reproduction Sample
https://codepen.io/pen?template=emzLWmy
Reproduction Version
5.2.0-next.29
Relevant Info
Regression?
No. Not a regression.
Priority impact
impact - p2 - want for an upcoming milestone
Impact
Breaks reliability for wrapper-component architectures that compose Calcite components through Shadow DOM projection.
Calcite package
Esri team
N/A
Reproduction Steps
CodePen Failure Example
Paste the following into the CodePen template to reproduce the issue pattern: