Skip to content

Commit

Permalink
feat: beforeDestroy
Browse files Browse the repository at this point in the history
  • Loading branch information
IWANABETHATGUY committed Jan 21, 2020
1 parent 8bca09a commit 4759efe
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/views/index/FormDrawer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,9 @@ export default {
}
})
},
beforeDestroy() {
window.removeEventListener('keydown', this.preventDefaultSave)
},
methods: {
preventDefaultSave(e) {
if (e.key === 's' && (e.metaKey || e.ctrlKey)) {
Expand Down

0 comments on commit 4759efe

Please sign in to comment.