Translation of the main answer this question from SOen:
This behavior occurs when the modal has a fixed or relative position, or is within a fixed or relative position.
Verify that the modal and all its parent elements are positioned in the default way to solve the problem.
Here are some ways to do this:
The easiest way is to simply move the% modal_component out of any specially positioned elements. A good place might be just before the closing tag div
.
Alternatively, you can remove </body>
: 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 you have a other answer below, which might help, from what you described in the question:
...
What worked: Set positions
from z-index
to .modal-backdrop
.
.modal-backdrop {
z-index: -1;
}