Answer the question
In order to leave comments, you need to log in
Why does the header shift when opening the bootstrap modal window?
Hello. When opening the modal, the header shifted, I found a fix,
var fixedCls = '.minimized-header,.b-filter--floating';
var oldSSB = $.fn.modal.Constructor.prototype.setScrollbar;
$.fn.modal.Constructor.prototype.setScrollbar = function () {
oldSSB.apply(this);
if (this.bodyIsOverflowing && this.scrollbarWidth)
$(fixedCls).css('padding-right', this.scrollbarWidth);
}
var oldRSB = $.fn.modal.Constructor.prototype.resetScrollbar;
$.fn.modal.Constructor.prototype.resetScrollbar = function () {
oldRSB.apply(this);
$(fixedCls).css('padding-right', '');
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question