Skip to content

Commit

Permalink
Merge pull request #1432 from st3iny/fix/noid/modal-freeze
Browse files Browse the repository at this point in the history
Fix modal freeze
  • Loading branch information
skjnldsv authored Oct 6, 2020
2 parents f8ee0c5 + 78a34bb commit be5b271
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/components/Modal/Modal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,8 @@ export default {
},
beforeDestroy() {
window.removeEventListener('keydown', this.handleKeydown)
this.mc.off('swipeleft swiperight')
this.mc.destroy()
},
mounted() {
this.showModal = true
Expand All @@ -339,9 +341,8 @@ export default {
// force mount the component to body
document.body.insertBefore(this.$el, document.body.lastChild)
},
unmounted() {
this.mc.off('swipeleft swiperight')
this.mc.destroy()
destroyed() {
this.$el.remove()
},

methods: {
Expand Down

0 comments on commit be5b271

Please sign in to comment.