Open a modal window in a modal window body jumps to the left
Created by: drtvader
Hello! Why when opening modal in modal, there is a shift of all the site of the body? What could be the reason? I use this code, but it only works for the first modal Thanks!
$(document).ready(function(){
$(window).load(function(){
var oldSSB = $.fn.modal.Constructor.prototype.setScrollbar;
$.fn.modal.Constructor.prototype.setScrollbar = function ()
{
oldSSB.apply(this);
if(this.bodyIsOverflowing && this.scrollbarWidth)
{
$('.minimized-header,.b-filter--floating').css('padding-right', this.scrollbarWidth);
}
}
var oldRSB = $.fn.modal.Constructor.prototype.resetScrollbar;
$.fn.modal.Constructor.prototype.resetScrollbar = function ()
{
oldRSB.apply(this);
$('.minimized-header,.b-filter--floating').css('padding-right', '');
}
});
});