Since 5.2.1 modals closes on content removal
Created by: jbroutier
Prerequisites
-
I have searched for duplicate or closed issues -
I have validated any HTML to avoid common problems -
I have read the contributing guidelines
Describe the issue
Since version 5.2.1, when a button in the modal body triggers the removal of the button itself or its parent, the modal closes. It worked correctly with version 5.2.0.
Edit:
Definitely related to #36863, reverting it fixes the issue.
Reduced test cases
For both test cases, click on the "Open modal" button then click on any "Remove row" button.
- With Bootstrap 5.2.0: https://codepen.io/jbroutier/pen/JjvKzqZ
- With Bootstrap 5.2.1: https://codepen.io/jbroutier/pen/dyeXrLQ
What operating system(s) are you seeing the problem on?
Linux
What browser(s) are you seeing the problem on?
Firefox
What version of Bootstrap are you using?
5.2.1