Closed gitpaladin closed 6 years ago
Have the same problem. @gitpaladin did you solve this?
@fundon @luventa @netpi any suggestions?
For anyone wondering how to approach this. As far as I can gather, the component is destroyed when the parent component is destroyed, however, because the modal appends its element to the document it has to manually remove the element on destroy. This is what I added to BaseModal.vue `data() { return { show: this.visible } },
destroyed() { this.$emit('close') try { document.body.removeChild(this.$el) } catch (e) {
}
},
mounted() { document.body.appendChild(this.$el) },` I added the try because the element is not necessarily a child of the document I found, could be handled differently. I don't know if this is still being maintained but could make a pull request?
edit: sorry for the formatting the code highlight is not working for me or something
When user goes back, the parent component may be destroyed. So the modal dialog should be closed rather remaining on the top.