stop outside scroll opened modal code example
Example: prevent body from scrolling when a modal is opened
$('#adminModal').modal().on('shown', function(){
$('body').css('overflow', 'hidden');
}).on('hidden', function(){
$('body').css('overflow', 'auto');
})