Modal: only add scrollbar spacing when there is a scrollbar

This commit is contained in:
Felix Niklas 2020-03-10 11:51:19 +01:00 committed by Thorsten Eckel
parent 664d433d3a
commit 1df24fe354

View file

@ -257,8 +257,8 @@
left: this.$body.offset().left, left: this.$body.offset().left,
top: this.$body.offset().top, top: this.$body.offset().top,
width: this.$body.width(), width: this.$body.width(),
paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '', paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing && this.scrollbarWidth > 0 ? this.scrollbarWidth : '',
paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : '' paddingRight: this.bodyIsOverflowing && !modalIsOverflowing && this.scrollbarWidth > 0 ? this.scrollbarWidth : ''
} }
if(App.i18n.dir() == 'rtl'){ if(App.i18n.dir() == 'rtl'){