bootstrap
bootstrap copied to clipboard
Toggle between modals makes the backdrop too dark
Prerequisites
- [X] I have searched for duplicate or closed issues
- [X] I have validated any HTML to avoid common problems
- [X] I have read the contributing guidelines
Describe the issue
Toggle between modals makes the backdrop too dark during a short time because there are 2 div modal-backdrop with opacity 0.5 which adds up and becomes opacity 1.0.
https://user-images.githubusercontent.com/643434/159191366-f4afb8e6-370d-4e4d-be01-78132cf64d6c.mov
Can be verified with 5.1.3 and also using main.
Reduced test cases
https://getbootstrap.com/docs/5.1/components/modal/#toggle-between-modals
Can be best seen by slowing down the animation:
.fade {
transition: opacity 1s linear; // instead of 0.15s
}
What operating system(s) are you seeing the problem on?
macOS
What version of Bootstrap are you using?
v5.1.3 and main
I don't think this is worth fixing
How is this not worth fixing? I believe 200% it is, it looks like a glitch. I propose that if a backdrop already exists, do not populate a new one, re-use the old already existing one instead.
Or are there any solution to this yet?