MCPcopy Index your code
hub / github.com/reactstrap/reactstrap / conditionallyUpdateScrollbar

Function conditionallyUpdateScrollbar

src/utils.js:32–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

30}
31
32export function conditionallyUpdateScrollbar() {
33 const scrollbarWidth = getScrollbarWidth();
34 // https://github.com/twbs/bootstrap/blob/v4.0.0-alpha.6/js/src/modal.js#L433
35 const fixedContent = document.querySelectorAll(
36 '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top',
37 )[0];
38 const bodyPadding = fixedContent
39 ? parseInt(fixedContent.style.paddingRight || 0, 10)
40 : 0;
41
42 if (isBodyOverflowing()) {
43 setScrollbarWidth(bodyPadding + scrollbarWidth);
44 }
45}
46
47let globalCssModule;
48

Callers 2

initFunction · 0.90
initFunction · 0.90

Calls 3

getScrollbarWidthFunction · 0.85
isBodyOverflowingFunction · 0.85
setScrollbarWidthFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…