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: fix shortcut to togglePanel #212

Merged
merged 2 commits into from May 2, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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