Update modal.js

This commit is contained in:
XhmikosR 2020-12-15 11:23:25 +02:00 committed by GitHub
parent 5ce207dd86
commit e5933330e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -516,11 +516,9 @@ class Modal extends BaseComponent {
Manipulator.setDataAttribute(element, cssProp, actualValue)
if (cssProp === 'marginRight') {
element.style[cssProp] = `${Number.parseFloat(computedValue) - this._scrollbarWidth}px`
} else {
element.style[cssProp] = `${Number.parseFloat(computedValue) + this._scrollbarWidth}px`
}
element.style[cssProp] = cssProp === 'marginRight' ?
`${Number.parseFloat(computedValue) - this._scrollbarWidth}px` :
`${Number.parseFloat(computedValue) + this._scrollbarWidth}px`
}
_removeElementAttributes(element, cssProp) {