Skip to content

Commit 6cfc682

Browse files
authored
fix(modal): Minor bug fixes
1 parent 011afd4 commit 6cfc682

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/components/modal.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@
531531
// Note: DOMNode.style.paddingRight returns the actual value or '' if not set
532532
// while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set
533533
534-
const ComputedStyle = document.getComputedStyle;
534+
const computedStyle = window.getComputedStyle;
535535
const body = document.body;
536536
537537
// Adjust fixed content padding
@@ -551,7 +551,7 @@
551551
});
552552
553553
// Adjust navbar-toggler margin
554-
selectAll('.navbar-toggler').forEach(element => {
554+
selectAll('.navbar-toggler').forEach(el => {
555555
const actualMargin = el.style.marginRight;
556556
const calculatedMargin = computedStyle(el).marginRight;
557557
setAttr(el, 'data-margin-right', actualMargin);
@@ -561,7 +561,7 @@
561561
// Adjust body padding
562562
const actualPadding = body.style.paddingRight;
563563
const calculatedPadding = computedStyle(body).paddingRight;
564-
setAtttr(body, 'data-padding-right', actualPadding);
564+
setAttr(body, 'data-padding-right', actualPadding);
565565
body.style.paddingRight = `${parseFloat(calculatedPadding) + this.scrollbarWidth}px`;
566566
}
567567
},

0 commit comments

Comments
 (0)