Skip to content

Commit

Permalink
removeEventListener
Browse files Browse the repository at this point in the history
  • Loading branch information
KABBOUCHI committed Jan 23, 2019
1 parent 298aed4 commit 74ab176
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion dist/js/field.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions resources/js/components/Detail/ImpersonateField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
created() {
document.addEventListener('keydown', this.handleKeyDown);
},
destroyed(){
document.removeEventListener('keydown', this.handleKeyDown);
},
methods: {
handleKeyDown(e) {
if (e.key === this.field.key_down) {
Expand Down

0 comments on commit 74ab176

Please sign in to comment.