How to hide bootstrap modal in show.bs.modal event? – Javascript
Here is a code example: let order_modal = document.getElementById('order'); order_modal.addEventListener('show.bs.modal', function (e) { bootstrap.Modal.getInstance(order_modal).hide(); }, false); When I open the modal, it opens, the .hide() method does not work. If I change event to 'shown.bs.modal' it works but modal blinks.