Skip to content

Commit

Permalink
extending equipment modal hack to address #11015 (#11070)
Browse files Browse the repository at this point in the history
* extending equipment modal hack to address #11015

* fix(modal): call hack only once, remove more dangling body props
  • Loading branch information
randi2kewl authored and SabreCat committed Mar 21, 2019
1 parent e7979a9 commit f454700
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion website/client/components/inventory/equipment/equipGearModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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()")
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit f454700

Please sign in to comment.