prevent modal close on click outside code example Example: prevent close modal when click outside Click to copy$('#myModal').modal({ backdrop: 'static', keyboard: false }) or in HTML