From 65553250b5072acefdee0e777f390faf97cb3add Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Tue, 21 Jan 2025 21:50:32 +0200 Subject: [PATCH] fix(geomap): dismissing add with any key --- src/public/app/widgets/type_widgets/geo_map.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/public/app/widgets/type_widgets/geo_map.ts b/src/public/app/widgets/type_widgets/geo_map.ts index 406cd6e00..d5157301d 100644 --- a/src/public/app/widgets/type_widgets/geo_map.ts +++ b/src/public/app/widgets/type_widgets/geo_map.ts @@ -265,6 +265,10 @@ export default class GeoMapTypeWidget extends TypeWidget { this.#changeState(State.NewNote); const globalKeyListener: (this: Window, ev: KeyboardEvent) => any = (e) => { + if (e.key !== "Escape") { + return; + } + this.#changeState(State.Normal); window.removeEventListener("keydown", globalKeyListener);