Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix keyboard shortcut bindings #2873

Merged
merged 1 commit into from
Nov 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions resources/js/components/assets/Folder/Folder.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,8 @@ export default {
},

created() {
// Allow key commands with a focused input
this.$keys.stop(e => {
return ! ['enter', 'escape'].includes(e.code.toLowerCase())
})

this.$keys.bind('enter', this.submit)
this.$keys.bind('esc', this.cancel)
this.$keys.bindGlobal('enter', this.submit)
this.$keys.bindGlobal('esc', this.cancel)
},

}
Expand Down
7 changes: 1 addition & 6 deletions resources/js/components/structures/PageEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,7 @@ export default {
},

created() {
// Allow key commands with a focused input
this.$keys.stop(e => {
return ! ['enter'].includes(e.code.toLowerCase())
})

this.$keys.bind('enter', this.submit)
this.$keys.bindGlobal('enter', this.submit)
},

}
Expand Down