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 closes when clicking on a dynamically inserted element using AngularJS #37193

Closed
3 tasks done
azmith10k opened this issue Sep 22, 2022 · 2 comments
Closed
3 tasks done

Comments

@azmith10k
Copy link

Prerequisites

Describe the issue

I encountered this issue while adding Bootstrap v5.2.1 to a legacy codebase that runs using AngularJS v1.8.3.

The library swap went smooth for 5.2.0, but ever since 5.2.1 there has been an issue with the last element rendered with a scoped array variable using AngularJS' ng-repeat directive whose click action directly manipulates the aforementioned variable.

I have linked to a reduced test case for the same.

It would be nice if you guys can find the issue, but I can understand if you chose not to since AngularJS is way past LTS.

PS: While debugging, I noticed that switching data-bs-backdrop to static prevented the issue - meaning Bootstrap is probably thinking that the element is probably outside the modal.

Reduced test cases

Codepen link to the replicated issue

What operating system(s) are you seeing the problem on?

Windows, macOS, Linux

What browser(s) are you seeing the problem on?

Chrome, Safari, Firefox

What version of Bootstrap are you using?

v5.2.1

@GeoSot
Copy link
Member

GeoSot commented Sep 22, 2022

Hey @azmith10k. Check this please #37128

You can also try this script if it solves your problem
https://deploy-preview-37128--twbs-bootstrap.netlify.app/docs/5.2/dist/js/bootstrap.bundle.min.js

@azmith10k
Copy link
Author

Hey @GeoSot! Thanks for your swift response.

Checked out the bundle from that PR and it worked as intended. I will close this issue.

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