Fixed #869 - Sidebar Mask not being removed from DOM
parent
bb49c9fcf1
commit
e6a02b264c
|
@ -54,7 +54,7 @@ export default {
|
||||||
mask: null,
|
mask: null,
|
||||||
maskClickListener: null,
|
maskClickListener: null,
|
||||||
beforeUnmount() {
|
beforeUnmount() {
|
||||||
this.unbindMaskClickListener();
|
this.destroyModal();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
hide() {
|
hide() {
|
||||||
|
@ -104,10 +104,7 @@ export default {
|
||||||
if (this.mask) {
|
if (this.mask) {
|
||||||
DomHandler.addClass(this.mask, 'p-sidebar-mask-leave');
|
DomHandler.addClass(this.mask, 'p-sidebar-mask-leave');
|
||||||
this.mask.addEventListener('transitionend', () => {
|
this.mask.addEventListener('transitionend', () => {
|
||||||
this.unbindMaskClickListener();
|
this.destroyModal();
|
||||||
document.body.removeChild(this.mask);
|
|
||||||
DomHandler.removeClass(document.body, 'p-overflow-hidden');
|
|
||||||
this.mask = null;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -124,6 +121,14 @@ export default {
|
||||||
this.mask.removeEventListener('click', this.maskClickListener);
|
this.mask.removeEventListener('click', this.maskClickListener);
|
||||||
this.maskClickListener = null;
|
this.maskClickListener = null;
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
destroyModal() {
|
||||||
|
if (this.mask) {
|
||||||
|
this.unbindMaskClickListener();
|
||||||
|
document.body.removeChild(this.mask);
|
||||||
|
DomHandler.removeClass(document.body, 'p-overflow-hidden');
|
||||||
|
this.mask = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
Loading…
Reference in New Issue