From 30aff921d87450134481bca844f4dd5473895130 Mon Sep 17 00:00:00 2001 From: AlexHalbesleben Date: Sat, 17 Sep 2022 21:02:59 -0500 Subject: [PATCH 1/2] Update hotkey code --- src/App.vue | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/App.vue b/src/App.vue index b3286bd..0239608 100644 --- a/src/App.vue +++ b/src/App.vue @@ -66,19 +66,9 @@ export default class App extends Vue { } mounted() { - window.addEventListener("keydown", (ev: KeyboardEvent) => { + window.addEventListener("keyup", (ev: KeyboardEvent) => { const changelogModal = this.$refs.changelogModal as ChangelogModal; - if (ev.keyCode === 37) { - if (vxm.store.changelogModalShown) { - changelogModal.backVersion(); - } - } else if (ev.keyCode === 39) { - if (vxm.store.changelogModalShown) { - changelogModal.forwardVersion(); - } - } - let fn = ( { t: () => this.newTask(), @@ -86,8 +76,19 @@ export default class App extends Vue { r: () => this.newReminder(), s: () => this.$bvModal.show("settings-modal"), h: () => this.$bvModal.show("help-modal"), + ArrowRight: () => { + if (vxm.store.changelogModalShown) { + changelogModal.forwardVersion(); + } + }, + ArrowLeft: () => { + if (vxm.store.changelogModalShown) { + changelogModal.backVersion(); + } + }, } as Record void> )[ev.key]; + if (fn) fn(); }); } From effe5edad6ca22b2961a20bf2aa8e23132ef3962 Mon Sep 17 00:00:00 2001 From: AlexHalbesleben Date: Sat, 17 Sep 2022 21:05:20 -0500 Subject: [PATCH 2/2] Update changelog --- src/types/Changelog.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/types/Changelog.ts b/src/types/Changelog.ts index eba8101..da3a426 100644 --- a/src/types/Changelog.ts +++ b/src/types/Changelog.ts @@ -168,4 +168,10 @@ Typing a hotkey in the description field in the task modal could open modals/tri description: "Updates styles so that reminder-colored elements darken on hover", }, + { + version: "3.6.9", + title: "Hotkey fix", + description: + "Refreshing the page with a keyboard shortcut no longer brings up the reminder modal", + }, ];