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

Modal windows - append to body feature #1018

Closed
ghost opened this issue Nov 9, 2016 · 5 comments
Closed

Modal windows - append to body feature #1018

ghost opened this issue Nov 9, 2016 · 5 comments

Comments

@ghost
Copy link

ghost commented Nov 9, 2016

Bug description:

Support for modal append-to-body.

Link to minimally-working plunker that reproduces the issue:

We had to explicitly add <template ngbModalContainer></template> to the parent container incase a modal window is to be opened up.

The modal overlay/ backdrop occupies full window as expected, if the parent container is body/ rootElement in the page; If in case the modal window opening is triggered at nth depth (n > 1) we will be ending up at backdrop getting only to the container not to the entire window. In angular 1 the feature to add modal to body is by default and adds to parent, if specified which is not the case in angular 2.

a

Please allow us to add modal component to body at every nth depth, by passing appendTo: 'body' property while supplying NgbModalOptions

@ghost
Copy link
Author

ghost commented Nov 9, 2016

Please give me a pointer to add this feature sooner possible
@scttcper

@pkozlowski-opensource
Copy link
Member

@shnmkhk I'm sorry but it is not very clear what issue you are raising here? Are you saying that all modal and backdrop elements should be inserted as direct children of the <body> element instead of being siblings of <template ngbModalContainer></template>? If so, I agree that we should do this but I don't think I see much point in having the appendTo: 'body' option - IMO we should append to <body> by default.

@ghost
Copy link
Author

ghost commented Nov 10, 2016

Yes @pkozlowski-opensource I mean to add a feature how it was doing earlier in Angular 1, adding window, backdrop to the body tag by default. It was giving an option called appendTo property in Angular 1 modal options definition. We don't see such option in Angular 2 counter part

@morriq
Copy link

morriq commented Dec 21, 2016

Hello, how are things going here? Do we have some workaround for that?

@katesowles
Copy link

Any updates?

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.

3 participants