mirror of
https://github.com/DirectoryLister/DirectoryLister.git
synced 2025-08-31 09:31:52 +02:00
Updated keyboard events to take advantage of the KeyboardEvent object
This commit is contained in:
@@ -19,7 +19,7 @@ const app = new Vue({
|
||||
}
|
||||
},
|
||||
mounted: function() {
|
||||
window.addEventListener('keyup', e => e.keyCode == 191 && this.$refs.searchInput.focus());
|
||||
window.addEventListener('keyup', e => e.key == '/' && this.$refs.searchInput.focus());
|
||||
|
||||
let scrollToTop = this.$refs.scrollToTop;
|
||||
window.addEventListener('scroll', function() {
|
||||
|
@@ -86,7 +86,7 @@
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
window.addEventListener('keyup', e => e.keyCode == 27 && this.hide());
|
||||
window.addEventListener('keyup', e => e.key == 'Escape' && this.hide());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user