I am showing a Bootstrap modal window for loading when performing AJAX calls. I broadcast a \"progress.init\" event when the loading modal should show and a \"progress.finis
Using the code below continuously adds 7px padding on the body element every time you open and close a modal.
$('modalId').modal('hide');
$('body').removeClass('modal-open');
$('.modal-backdrop').remove();`
For those who still use Bootstrap 3, here is a hack'ish workaround.
$('#modalid').modal('hide');
$('.modal-backdrop').hide();
document.body.style.paddingRight = '0'
document.getElementsByTagName("body")[0].style.overflowY = "auto";