### Steps to reproduce Steps: 1. Open this link to live example: (required) 2. 3. ### Current behavior https://github.com/mui/material-ui/blob/master/packages/mui-utils/src/getActiveElement/getActiveElement.ts https://github.com/mui/material-ui/blob/master/packages/mui-material/src/Unstable_TrapFocus/FocusTrap.tsx getActiveElements tries to resolve the active Element: > element.shadowRoot.activeElement This only works if shadowRoot is open. If shadowRoot is closed, element.shadowRoot is always null There was already an issue ( https://github.com/mui/material-ui/issues/34061 ) which resolved it for the open shadowRoot ### Expected behavior _No response_ ### Context _No response_ ### Your environment <details> <summary><code>npx @mui/envinfo</code></summary> ``` Don't forget to mention which browser you used. Output from `npx @mui/envinfo` goes here. ``` </details> **Search keywords**: shadow dom keyboard select
Steps to reproduce
Steps:
Current behavior
https://github.com/mui/material-ui/blob/master/packages/mui-utils/src/getActiveElement/getActiveElement.ts
https://github.com/mui/material-ui/blob/master/packages/mui-material/src/Unstable_TrapFocus/FocusTrap.tsx
getActiveElements tries to resolve the active Element:
This only works if shadowRoot is open. If shadowRoot is closed, element.shadowRoot is always null
There was already an issue ( #34061 ) which resolved it for the open shadowRoot
Expected behavior
No response
Context
No response
Your environment
npx @mui/envinfoSearch keywords: shadow dom keyboard select