File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -13,13 +13,24 @@ import { useEventListener } from '@vueuse/core'
1313import { useI18n } from ' vue-i18n'
1414
1515import Button from ' @/components/ui/button/Button.vue'
16+ import { useAppMode } from ' @/composables/useAppMode'
1617import { useAppModeStore } from ' @/stores/appModeStore'
18+ import { useDialogStore } from ' @/stores/dialogStore'
1719
1820const { t } = useI18n ()
1921const appModeStore = useAppModeStore ()
22+ const dialogStore = useDialogStore ()
23+ const { isBuilderMode } = useAppMode ()
2024
2125useEventListener (window , ' keydown' , (e : KeyboardEvent ) => {
22- if (e .key === ' Escape' && ! e .ctrlKey && ! e .altKey && ! e .metaKey ) {
26+ if (
27+ e .key === ' Escape' &&
28+ ! e .ctrlKey &&
29+ ! e .altKey &&
30+ ! e .metaKey &&
31+ dialogStore .dialogStack .length === 0 &&
32+ isBuilderMode .value
33+ ) {
2334 e .preventDefault ()
2435 e .stopPropagation ()
2536 onExitBuilder ()
You can’t perform that action at this time.
0 commit comments