extending equipment modal hack to address #11015 (#11070)

* extending equipment modal hack to address #11015

* fix(modal): call hack only once, remove more dangling body props
This commit is contained in:
Randi Miller 2019-03-21 14:37:35 -04:00 committed by Sabe Jones
parent e7979a99e6
commit f454700722

View file

@ -4,6 +4,7 @@
v-if="item != null",
:hide-header="true",
@change="onChange($event)"
@hide="fixDocBody()"
)
div.close
span.svg-icon.inline.icon-10(aria-hidden="true", v-html="icons.close", @click="hideDialog()")
@ -187,8 +188,16 @@
},
hideDialog () {
this.$root.$emit('bv::hide::modal', 'equipgear-modal');
},
fixDocBody () {
document.body.classList.remove('modal-open');
document.body.setAttribute('data-modal-open-count', document.body.getAttribute('data-modal-open-count') - 1);
if (document.body.getAttribute('data-modal-open-count') <= 1) {
document.body.removeAttribute('data-modal-open-count');
} else {
document.body.setAttribute('data-modal-open-count', document.body.getAttribute('data-modal-open-count') - 1);
}
document.body.removeAttribute('data-padding-right');
document.body.style.removeProperty('padding-right');
},
memberOverrideAvatarGear (gear) {
return {