Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NgbModalStack doesn't support container selector existing within a shadowdom #3584

Closed
drobins29 opened this issue Feb 12, 2020 · 1 comment · Fixed by #3585
Closed

NgbModalStack doesn't support container selector existing within a shadowdom #3584

drobins29 opened this issue Feb 12, 2020 · 1 comment · Fixed by #3585

Comments

@drobins29
Copy link
Contributor

Bug description:

When providing the selector for the container option when opening a modal, it is impossible to specify an element that exists within a shadow dom. It would be nice to be able to pass a DOM object with the NgbModalOptions to the NgbModal open method.

My use case is that we are embedding an angular app within an existing application and we do not want external styling to affect the styling of the embedded app. So the main component is using encapsulation: ViewEncapsulation.ShadowDom to get around the styling issues and importing the bootstrap css within the main app component's sass file in a parent selector.

If we could pass a DOM element instead of a selector that would allow the modal to pick up the correct styling.

Link to minimally-working StackBlitz that reproduces the issue:

https://stackblitz.com/edit/angular-wymgqp

Versions of Angular, ng-bootstrap and Bootstrap:

Angular: >=8.2.4

ng-bootstrap: 5.2.2

@PabloPollono-Nexplore
Copy link

hey I have the same issue and the container option is not working for me, can you show me the fix for the shadow dom + container option?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants