Feature Request: Add animation to modal when its backdrop is static.
See original GitHub issueWhen the modal has the property:
{backdrop: 'static', keyboard: false}
Or when it has the attributes:
data-backdrop="static" data-keyboard="false"
Obviously, it would not be close if the user tries to click outside of it and also using <kbd>esc</kbd> key. Then it should show the user that anything is important in modal (user needs to check modal) by showing any animation like scale to get the user attention there. Like the chrome’s clear browser data modal:

Issue Analytics
- State:
- Created 5 years ago
- Reactions:9
- Comments:9 (6 by maintainers)
Top Results From Across the Web
Bootstrap Modal sitting behind backdrop - Stack Overflow
Just move the entire modal outside of the rest of your code, to the very bottom. It doesn't need to be nested in...
Read more >Modal - Bootstrap
Use Bootstrap's JavaScript modal plugin to add dialogs to your site for lightboxes, user notifications, or completely custom content.
Read more >backdrop - CSS: Cascading Style Sheets - MDN Web Docs
The ::backdrop pseudo-element makes it possible to obscure, style, or completely hide everything located below the element when it's the ...
Read more >Bootstrap Modal -- Tutorials with advanced examples - Torus Kit
When backdrop is set to static, the modal will not close when clicking outside it. Click the button below to try it.
Read more >Modal · Boosted v5.2
Use Boosted's JavaScript modal plugin to add dialogs to your site for lightboxes, ... When backdrop is set to static, the modal will...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

What if bootstrap fired a
hidePrevented.bs.modalevent? You could then control what happens… perhaps bootstrap could do the animation unless you callpreventDefault()on the eventAgree. In applications with both static and non-static modals, user may be confused with these two different behaviors without feedback (on hide prevented).
It looks like we could fire the event from here:
https://github.com/twbs/bootstrap/blob/32ab52ba2e9dc2549304fcef14dede7806384f34/js/src/modal.js#L355-L359