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

Dialogs stacks in incorrect order #902

Closed
amariniello opened this issue Oct 18, 2016 · 2 comments
Closed

Dialogs stacks in incorrect order #902

amariniello opened this issue Oct 18, 2016 · 2 comments

Comments

@amariniello
Copy link

Bug description:

If you open multiple dialogs at the same time the last opened modal get's inserted before the others.
Example:

--Open 1 dialog (dialog1)
--From dialog1 open a second dialog (dialog2)-
--dialog2 is not visible as it's hidden under dialog1
--close dialog1 and you will see dialog2

Expected Behavior

dialog2 should be placed in front of dialog1

In my opinion the incriminated piece of code is in the 'master/src/modal/modal-container.ts'
this._viewContainerRef.createComponent(this._windowFactory, 0, this._injector, contentRef.nodes);

this inserts the element at position 0 (behind)
i personally think the position should be undefined so that it will be inserted last(angular docs)

You can use this template as a starting point: http://plnkr.co/edit/IZ3ugtRbRYYoX0QketIV?p=preview

Version of Angular, ng-bootstrap, and Bootstrap:

Angular: 2.0.1

ng-bootstrap: 1.0.0-alpha.8

Bootstrap: 4.0.0-alpha.4

@pkozlowski-opensource
Copy link
Member

This will be solved by #901 - merging it later today. Please note that just solving order of elements might not be enough to fully support stacked modals - this is tracked in #643

Closing as a duplicate of #901 and #643

@amariniello
Copy link
Author

Yes i understand the challenges. but it will work for simple cases. Thanks

pkozlowski-opensource pushed a commit that referenced this issue Oct 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants