You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const element = document.querySelector(`[title="${name}"]`);
In the shadowDOM, element returns as null and later the Carbon component tries to do setIsEllipsisApplied(element.offsetWidth < element.scrollWidth); - this is where it bombs out with the error:
TypeError: Cannot read properties of null (reading 'offsetWidth')
at isEllipsisActive (FileUploaderItem.js:72:34)
at eval (FileUploaderItem.js:77:5)
at commitHookEffectListMount (react-dom.development.js:23184:26)
at commitLayoutEffectOnFiber (react-dom.development.js:23302:17)
at commitLayoutMountEffects_complete (react-dom.development.js:24722:9)
at commitLayoutEffects_begin (react-dom.development.js:24708:7)
at commitLayoutEffects_begin (react-dom.development.js:24690:11)
at commitLayoutEffects (react-dom.development.js:24646:3)
at commitRootImpl (react-dom.development.js:26857:5)
at commitRoot (react-dom.development.js:26716:5)
Package
@carbon/react
Browser
Chrome, Safari, Firefox
Package version
1.60.1
React version
18.3.1
Description
We use the shadowDOM.
When I update beyond
1.39.0
(1.39.0
works for us), I have an issue with theFileUploaderItem
component - this component works fine if not using shadowDOM.The issue is with line https://github.com/carbon-design-system/carbon/blob/main/packages/react/src/components/FileUploader/FileUploaderItem.tsx#L111
In the shadowDOM,
element
returns asnull
and later the Carbon component tries to dosetIsEllipsisApplied(element.offsetWidth < element.scrollWidth);
- this is where it bombs out with the error:Reproduction/example
https://stackblitz.com/edit/react-ts-mss5gp?file=index.tsx
Steps to reproduce
Just open the stackblitz link and you will see the error message.
Suggested Severity
Severity 2 = User cannot complete task, and/or no workaround within the user experience of a given component.
Application/PAL
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: