angular-ui / bootstrap

PLEASE READ THE PROJECT STATUS BELOW. Native AngularJS (Angular) directives for Bootstrap. Smaller footprint (20kB gzipped), no 3rd party JS dependencies (jQuery, bootstrap JS) required. Please read the README.md file before submitting an issue!
http://angular-ui.github.io/bootstrap/
MIT License
14.29k stars 6.73k forks source link

dropdowns won't close when parent stops event propagation #6334

Closed shooby83 closed 7 years ago

shooby83 commented 7 years ago

The issues forum is NOT for support requests. It is for bugs and feature requests only. Please read https://github.com/angular-ui/bootstrap/blob/master/CONTRIBUTING.md and search existing issues (both open and closed) prior to opening any new issue and ensure you follow the instructions therein.

Bug description:

I got a wrapper that stops event propagation. In that wrapper I got several directives with UI Bootstrap dropdowns.

The problem is, that these dropdowns doesn't close on any click. Only by clicking another dropdown.

Seems UI dropdown watches body or something to force closing.

Link to minimally-working plunker that reproduces the issue:

https://plnkr.co/edit/bHHrpipM4MlxLNfOE2pt?p=preview

Version of Angular, UIBS, and Bootstrap

Angular: 1.5.3 UIBS: 1.3.3 Bootstrap: 1.3.3

wesleycho commented 7 years ago

The listener is on document, as seen here - this is not likely to be changed, as this is important for the closing functionality when the click is outside the dropdown.

wesleycho commented 7 years ago

Going to close this as won't fix - one can use the is-open binding to work around this issue.