Skip to content

Commit

Permalink
fix(Modal): Update classes for fixed content detection (#600)
Browse files Browse the repository at this point in the history
  • Loading branch information
adam187 authored and TheSharpieOne committed Sep 29, 2017
1 parent 0bac1f4 commit 9b41e13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ export function getOriginalBodyPadding() {

export function conditionallyUpdateScrollbar() {
const scrollbarWidth = getScrollbarWidth();
// https://github.com/twbs/bootstrap/blob/v4.0.0-alpha.4/js/src/modal.js#L420
const fixedContent = document.querySelectorAll('.navbar-fixed-top, .navbar-fixed-bottom, .is-fixed')[0];
// https://github.com/twbs/bootstrap/blob/v4.0.0-alpha.6/js/src/modal.js#L433
const fixedContent = document.querySelectorAll('.fixed-top, .fixed-bottom, .is-fixed, .sticky-top')[0];
const bodyPadding = fixedContent ? parseInt(
fixedContent.style.paddingRight || 0,
10
Expand Down

0 comments on commit 9b41e13

Please sign in to comment.