Skip to content

Commit

Permalink
fix: fix shortcut to togglePanel (#212)
Browse files Browse the repository at this point in the history
  • Loading branch information
arashsheyda committed May 2, 2023
1 parent 153f22c commit e64dbcd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/devtools/client/app.vue
Expand Up @@ -32,7 +32,7 @@ const route = useRoute()
const isUtilityView = computed(() => route.path.startsWith('/__'))
const waiting = computed(() => !client.value && !showConnectionWarning.value)
addEventListener('keypress', (e) => {
addEventListener('keydown', (e) => {
if (e.code === 'KeyD' && e.altKey) {
client.value?.closeDevTools()
e.preventDefault()
Expand Down
2 changes: 1 addition & 1 deletion packages/devtools/src/runtime/plugins/devtools.client.ts
Expand Up @@ -54,7 +54,7 @@ export default defineNuxtPlugin((nuxt: Nuxt) => {
document.body.appendChild(holder)

// Shortcut to toggle devtools
addEventListener('keypress', (e) => {
addEventListener('keydown', (e) => {
if (e.code === 'KeyD' && e.altKey && e.shiftKey)
togglePanel()
})
Expand Down

0 comments on commit e64dbcd

Please sign in to comment.