We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 58a5bc5 commit 23bcfbaCopy full SHA for 23bcfba
packages/clay-modal/src/Modal.tsx
@@ -69,7 +69,7 @@ const ClayModal: React.FunctionComponent<IProps> = ({
69
children,
70
className,
71
observer,
72
- opener = document.body,
+ opener,
73
size,
74
spritemap,
75
status,
@@ -78,7 +78,7 @@ const ClayModal: React.FunctionComponent<IProps> = ({
78
}: IProps) => {
79
const modalElementRef = useRef<HTMLDivElement | null>(null);
80
const modalBodyElementRef = useRef<HTMLDivElement | null>(null);
81
- const openerRef = useRef< Element| null>(opener);
+ const openerRef = useRef< Element| null>(opener ? opener : null);
82
83
warning(observer !== undefined, warningMessage);
84
0 commit comments