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

[Bug] - Nested popover - autoclose="outside" not working #4694

Open
shyamal890 opened this issue May 9, 2024 · 2 comments
Open

[Bug] - Nested popover - autoclose="outside" not working #4694

shyamal890 opened this issue May 9, 2024 · 2 comments

Comments

@shyamal890
Copy link

Bug description:

If there are nested popovers and if you click on a nested popover it closes all popovers.

  • For all popovers the following configuration applies [autoClose]="'outside'" and [container]="'body'"

Note: It works fine if the nested popover is not appended to the body.

Link to minimally-working StackBlitz that reproduces the issue: Link

Versions of Angular, ng-bootstrap and Bootstrap:

Angular: 17.x

ng-bootstrap: 16.x

Bootstrap: 5.x

@IAfanasov
Copy link
Contributor

The issue is that the second popup is outside of the first popup, so click inside the second popup triggers close of the first popup.
To solve it we should change the code so that the first popup do not close on the click of the second popup. An easy solution is not on the surface here. The reliable way will be to track the parent child relationships between popups.

@shyamal890
Copy link
Author

Yes, it would be great if the framework provides an inbuilt way to achieve this.

Alternatively, we can handle this ourselves in a hacky way if the following is addressed - #4680

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

No branches or pull requests

2 participants