We can do it in two ways.

1. If you open the popup by js then you can use
$('#Your_Popup_id').modal({backdrop: 'static', keyboard: false})

2. If you are use data attributes then you can do it by the use of
<a data-target="#Your_Popup_id" data-toggle="modal" data-backdrop="static" data-keyboard="false">
    Click here to open popup
</a>`

BY Best Interview Question ON 06 Feb 2019