diff --git a/src/components/ShortcutsHelper.vue b/src/components/ShortcutsHelper.vue index 0c8321e6..a2aae4df 100644 --- a/src/components/ShortcutsHelper.vue +++ b/src/components/ShortcutsHelper.vue @@ -152,9 +152,30 @@ export default defineComponent({ }, ], }, + { + label: t`Template Builder`, + description: t`Applicable when Template Builder is open`, + collapsed: false, + shortcuts: [ + { + shortcut: [this.ctrl, 'Enter'], + description: t`Apply and view changes made to the print template`, + }, + { + shortcut: [this.ctrl, 'E'], + description: t`Toggle Edit Mode`, + }, + ], + }, ]; }, computed: { + ctrl() { + if (this.isMac) { + return 'control'; + } + return 'Ctrl'; + }, pmod() { if (this.isMac) { return '⌘'; diff --git a/src/pages/CommonForm/CommonForm.vue b/src/pages/CommonForm/CommonForm.vue index cbfb2434..7e9389a3 100644 --- a/src/pages/CommonForm/CommonForm.vue +++ b/src/pages/CommonForm/CommonForm.vue @@ -181,7 +181,9 @@ export default defineComponent({ }, deactivated(): void { docsPathRef.value = ''; - focusedDocsRef.add(this.docOrNull); + if (this.docOrNull) { + focusedDocsRef.delete(this.doc); + } }, computed: { hasDoc(): boolean { diff --git a/src/pages/TemplateBuilder/TemplateBuilder.vue b/src/pages/TemplateBuilder/TemplateBuilder.vue index 8f5ff3ec..c3f1124f 100644 --- a/src/pages/TemplateBuilder/TemplateBuilder.vue +++ b/src/pages/TemplateBuilder/TemplateBuilder.vue @@ -139,11 +139,13 @@