Attempting to incorporate the Bootstrap 4 modal into a block results in an incorrect display. The modal appears in a "fade in" mode and becomes unresponsive, making it impossible to close the modal without refreshing the browser.
<div class="modal fade" id="cartConfirm" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-body">
<div class="container">
<div class="row">
<div class="col-lg-12 confrm-cart-box">
<div class="close-btn" data-dismiss="modal"><i class="fa fa-times"></i></div>
<h3>order confirmation</h3>
<br>
<br>
<p>Order number <span class="green">123456</span> has been confirmed.<br> You can monitor your order and its status by logging into your account.</p>
<a href="#" data-toggle="modal" data-target="#multi-login" data-dismiss="modal">Log In</a>
<p>An email with the order details has been sent for your convenience.</p>
<p>Feel free to contact us if you have any questions.</p>
<p><span class="green">Your order is protected by our 100% No Quibble Money Back Guarantee</span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<button data-toggle="modal" data-dismiss="modal" data-target="#cartConfirm">BUY</button>