feat(modal): Close all modals at once (do it in the same way as popover does)
See original GitHub issueAbout Modals from the doc:
You can emit … bv::hide::modal event on $root with the first argument set to the modal’s id.
Example:
this.$root.$emit(‘bv::hide::modal’,‘modal1’)
About Popover from the doc:
You can close (hide) all open popovers by emitting the bv::hide::popover event on $root
Example:
this.$root.$emit(‘bv::hide::popover’)
So the feature request is to add ability to use just this.$root.$emit('bv::hide::modal')
(i.e. without modal’s id) in order to close all modals.
This feature will be useful regarding this PR#2164.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
How to close all active bootstrap modals on session timeout?
Use the following code: $('.modal').modal('hide');. Also if you would like to do something if the modal is hidden then you can do this:...
Read more >Modal · Bootstrap
Modals are built with HTML, CSS, and JavaScript. · Clicking on the modal “backdrop” will automatically close the modal. · Bootstrap only supports...
Read more >Prevent Page Scrolling When a Modal is Open
You open a modal, scroll through it, close it, and wind up somewhere else on the page than you were when you opened...
Read more >How to handle multiple modals in React
Most applications have plenty of modals also sometimes referred to as popover, dialogs or popups. The most obvious way of displaying a modal...
Read more >Fancy Form Modals with Rails + Turbo
Gives us the ability to close the modal. This is triggered by clicking on the dedicated close button, or clicking anywhere outside the...
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 FreeTop 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
Top GitHub Comments
@TitanFighter a bit late to the party, but i ran into this today and wanted to close all modals no matter what when the route is changed…
assuming they have an id
The
<b-modal>
logic is already too complex to allow this kind of feature.