Translation of the main answer of this question soen:
This behavior occurs when the modal has a fixed or relative position, or is inside an element with a fixed or relative position.
Make sure that modal and all of its parent elements are positioned in the standard way to solve the problem.
Here are some ways to do this:
The easiest way is to simply move the div
modal out of any elements with special positioning. A good place can be just before the closing tag </body>
.
Alternatively, you can remove the positions
: the modal CSS properties and inherited (I was in doubt here in the translation...), until the problem disappears. However, this can change the appearance of the page.
update
And has a another answer below, which may help, for what you described in the question:
...
What worked: I named the z-index
of .modal-backdrop
for -1
.
.modal-backdrop {
z-index: -1;
}
Are you using bootstrap with jquery-ui or blockUI ? There is a conflict that occurs exactly that, it triggers the wrong background.
– RBoschini
@Rboschini bootstrap + jquery-ui
– Bia
Managed to solve?
– gustavox
@Gustavox followed all the tips, but I still can’t solve.
– Bia
Can’t post HTML? At least the relevant part... @Bia
– gustavox
Another thing you can do is pass to the modal the fade={false}, as below: <Modal isOpen={linkOpen} fade={false} toggle={toggle}>
– user185684