Skip to content

Commit

Permalink
Avoid bad scrollbar replacement into width values
Browse files Browse the repository at this point in the history
  • Loading branch information
mendozagioo authored and XhmikosR committed May 12, 2020
1 parent a22e290 commit dd9209a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/src/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ class Modal {

_checkScrollbar() {
const rect = document.body.getBoundingClientRect()
this._isBodyOverflowing = rect.left + rect.right < window.innerWidth
this._isBodyOverflowing = Math.round(rect.left + rect.right) < window.innerWidth
this._scrollbarWidth = this._getScrollbarWidth()
}

Expand Down

0 comments on commit dd9209a

Please sign in to comment.