Skip to content

Commit 74ab176

Browse files
committed
removeEventListener
1 parent 298aed4 commit 74ab176

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

dist/js/field.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

resources/js/components/Detail/ImpersonateField.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@
2525
created() {
2626
document.addEventListener('keydown', this.handleKeyDown);
2727
},
28+
destroyed(){
29+
document.removeEventListener('keydown', this.handleKeyDown);
30+
},
2831
methods: {
2932
handleKeyDown(e) {
3033
if (e.key === this.field.key_down) {

0 commit comments

Comments
 (0)