reactjs / react-modal

Accessible modal dialog component for React
http://reactcommunity.org/react-modal
MIT License
7.37k stars 809 forks source link

Runtime error when tabbing elements where shadowDom is a document fragment rather than an element #1039

Open majornista opened 9 months ago

majornista commented 9 months ago

el.activeElement in the following method will be null if el is a document fragment rather than an element, which throws a runtime error:

https://github.com/reactjs/react-modal/blob/a275399059cc37aa02cac7e9385512b02ff5cf15/src/helpers/scopeTab.js#L3-L7