Skip to content

Commit 05d618a

Browse files
SaKaNa-Yantfu
andauthored
feat(core): add Escape key to close dock panel and exit selection mode (#277)
Co-authored-by: Anthony Fu <github@antfu.me>
1 parent 26bd28b commit 05d618a

File tree

1 file changed

+2
-2
lines changed
  • packages/core/src/client/webcomponents/state

1 file changed

+2
-2
lines changed

packages/core/src/client/webcomponents/state/context.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,8 @@ export async function createDocksContext(
145145
source: 'client',
146146
title: 'Close Panel',
147147
icon: 'ph:x-circle-duotone',
148-
when: 'dockOpen',
149-
keybindings: [],
148+
when: 'dockOpen && !paletteOpen',
149+
keybindings: [{ key: 'Escape' }],
150150
action: () => {
151151
panelStore.value.open = false
152152
selectedId.value = null

0 commit comments

Comments
 (0)