@indico-data/design-system 2.21.1 → 2.21.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.esm.js
CHANGED
|
@@ -40910,7 +40910,11 @@ function ModalBase(props) {
|
|
|
40910
40910
|
ariaProps['describedby'] = describedBy;
|
|
40911
40911
|
}
|
|
40912
40912
|
// Try to render modal within the theme-root, otherwise attach to the root
|
|
40913
|
-
const parentSelector = () =>
|
|
40913
|
+
const parentSelector = () => {
|
|
40914
|
+
const themeRoot = document.getElementById('theme-root');
|
|
40915
|
+
const root = document.getElementById('root');
|
|
40916
|
+
return themeRoot || root || document.body;
|
|
40917
|
+
};
|
|
40914
40918
|
return (jsx(StyledModalBase, { ariaHideApp: false, "data-cy": props['data-cy'], aria: ariaProps, className: className || 'baseModal', contentLabel: 'labelText' in props ? props.labelText : null, id: id, isOpen: open, node: node, onRequestClose: clickToDismiss, parentSelector: parentSelector, shouldCloseOnEsc: !preventEscDismiss, shouldReturnFocusAfterClose: !preventReturnFocus, maxWidth: maxWidth, children: children }));
|
|
40915
40919
|
}
|
|
40916
40920
|
|