Can't close a Modal using JS
See original GitHub issue- OS: linux
- browser: Chrome latest
- test-case: https://jsfiddle.net/caub/x6t2ovqm/
As you can see, the backdrop is still there, after the modal gets closed
I could remove the backdrop myself document.querySelector('.modal-backdrop')?.remove()
but that feels quite hacky, this internal part should be part of bootstrap API
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:18 (6 by maintainers)
Top Results From Across the Web
Bootstrap: can't close modal - Stack Overflow
In the first page i have button connected to a Modal but when is open is not possible to closed it anymore and...
Read more >modal open with javascript, not close correctly #119 - GitHub
Hey everyone,. When opening the modal with JavaScript, please use the modal.hide(); method by manually adding the event listener to the close ......
Read more >Problems with modal (can't close it) - Laracasts
Hello! I ran into strange behavior when trying to close my modals. I wrote methods to show and close modal methods: { showModal:...
Read more >How to close modal in Bootstrap - code helpers
There are few ways to close modal in Bootstrap: click on a backdrop, close icon, or close button. You can also use JavaScript...
Read more >Can't close modal inside a listview - Retool Forum
I've inserted a button that runs a modal1.close() JS query when clicked, but I am getting this error message when clicking it: modal1.close...
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
So do you guys want the hide method to work synchronously? 😟 Since the code that you wrote is fine IMO @alpadev
/CC @GeoSot
@caub glad if that works for you.
I’d prefer to leave this open tho, so that we can track this and maybe at some point come up with an easier solution. Or maybe we should open a new feature issue for this. 🤔
/CC @GeoSot @rohit2sharma95