Why modal window is closed when clicking on it?

On the page there is a modal window with the form.
A modal window appears, but when I try to fill in a form (by clicking on molinae window), M. O. closes.

<a href="#" data-toggle="modal" data-target="#ReviewForm" class="btn btn-success">
 Leave a review
</a>

 <!-- Modal -->
 <div class="modal fade" id="ReviewForm" tabindex="-1" role="dialog" aria-labelledby="ReviewFormLabel" aria-hidden="true">
 <div class="modal-dialog" role="document">
 <div class="header_feedback_modal">
 <button type="button" class="close" data-dismiss="modal" aria-label="Close">
 <span aria-hidden="true">&times;</span>
</button>
 <h5 class="header_feedback_modal-title" id="ReviewFormLabel">Leave feedback</h5>
 <div class="header_feedback_modal-form">
 <div class="form-group">
 <input type="email" class="reviews-name form-control" placeholder="Your name">
</div>
 <div class="form-group">
 <input type="text" class="reviews-phone form-control" placeholder="Your phone number">
</div>
 <div class="form-group">
 <textarea rows="5" class="reviews-textarea form-control" placeholder="Text"></textarea>
</div>
 <input type="button" class="reviews-button btn btn-success" value="Send feedback">
</div>
</div>
</div>
 </div>


The website for leavel, bootstrap is mounted styles @import '~bootstrap/scss/bootstrap'; and scripts require('./bootstrap');
March 23rd 20 at 19:05
2 answers
March 23rd 20 at 19:07
Solution
Wrong markup for the modal window.
Where .modal-content ?
Here is a sample markup https://getbootstrap.com/docs/4.3/components/modal/
Compare.
Thank you! - filomena71 commented on March 23rd 20 at 19:10
March 23rd 20 at 19:09
Bootstraps of modelki closed when clicking outside of the content or layout background, i.e. dark background, it can be assumed that You have the background has a z-index higher than the actual window content.
Try background make static, change:
<div class="modal fade" id="YouModal" data-backdrop="static" tabindex="-1" role="dialog" aria-labelledby="YouModalLabel" aria-hidden="true">

Or a script call:
$('#YouModal').modal({
 backdrop: 'static',
 keyboard: true
})


Well, or handle the disappearance of the window:
$('#YouModal').on('hide.bs.modal', function (e) {
e.preventDefault();
e.the stoppropagation();
 return false;
});

Find more questions by tags Bootstrap