If one manually adds react-confirm-alert id to some other location of choice, the lib still writes something to body rootwith id react-confirm-alert-firm-svg.
I think that divTarget should be documented or even be optional prop that can be given.
If react-confirm-alert prop is given or manually set, react-confirm-alert-firm-svg should also use same location in DOM.
Workaround to fix this bug:
Add these lines of code to your desired location
{/* react-confirm-alert -id needed, otherwise the lib will write modal to the body root */}
<div id="react-confirm-alert" />
{/* react-confirm-alert-firm-svg -id needed, otherwise the lib will it to the body root */}
<div id="react-confirm-alert-firm-svg" />
It turns out that my workaround above won't work because there is this body class react-confirm-alert-body-element which location can not be changed same way.
If one manually adds
react-confirm-alert
id to some other location of choice, the lib still writes something to body rootwith idreact-confirm-alert-firm-svg
.I think that divTarget should be documented or even be optional prop that can be given.
If
react-confirm-alert
prop is given or manually set,react-confirm-alert-firm-svg
should also use same location in DOM.Workaround to fix this bug: