I have encountered a unique situation with my application where I am displaying a UI-Bootstrap modal inside a div
, positioned above a navigation bar. Typically, when the modal is launched, a backdrop (dimmer) covers the entire background. Interestingly, my modal is not attached to the body
element; instead, it is appended to the specific div
using these modal options:
appendTo: angular.element(document.querySelector("#mainContent")),
backdrop: true,
You can see an example of this behavior in action on this plunker.
The issue I am facing is that even though #mainContent
is nested within the DOM hierarchy, the backdrop dims the entire viewport. Is there a way to restrict the backdrop (or the entire modal structure) to only affect one specific element rather than the whole viewport?