I've tried :
$('#myModal').modal({backdrop: 'static', keyboard: false})
And tried adding to the modal div:
data-backdrop="static" data-keyboard="false"
But it wont stop the bootstrap model from closing on outside touch. I am using IOS safari btw.
I got some input radio on the modal but didnt add them to the code here.
My modal:
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#myModal" style="position: fixed;">
Launch modal
</button>
<!-- Modal -->
<div id="myModal" class="modal fade hide" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true" data-backdrop="static" data-keyboard="false">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-body">
<div id="sportHeader">choose sport:</div>
</div>
</div>
</div>
</div>