Open maxpatiiuk opened 3 months ago
I implemented a workaround, so this is no longer a must for next release, but a nice to have
I think this could be refactored to use the slotChangeHasContent
dom utility function.
This issue also applies to the calcite-text-area
component.
Check existing issues
Actual Behavior
<calcite-button>
thinks that it has slotted in content if you provide an HTML comment as a child to ithttps://github.com/Esri/calcite-design-system/blob/5478c2fcb67dc96cb98788419068eec47944ad1b/packages/calcite-components/src/components/button/button.tsx#L351-L357
Expected Behavior
<calcite-button>
should not consider comment to be a slotted in content.Reproduction Sample
https://codepen.io/maxpatiiuk/pen/mdZpWJb?editors=1000
Reproduction Steps
Reproduction Version
2.11.1
Relevant Info
No response
Regression?
No response
Priority impact
impact - p2 - want for an upcoming milestone
Impact
When an element is rendered using
lit-html
templates, comments may be inserted by lit-html - we don't have much control over that. Those comments are causing calcite to not render correctly.Our exact code in question (from the
arcgis-home
component in@arcgis/map-components
):Calcite package
Esri team
ArcGIS Maps SDK for JavaScript