fix(geomap): dismissing add with any key

pull/1017/head
Elian Doran 2025-01-21 21:50:32 +07:00
parent 31491b957b
commit 65553250b5
No known key found for this signature in database
1 changed files with 4 additions and 0 deletions

@ -265,6 +265,10 @@ export default class GeoMapTypeWidget extends TypeWidget {
this.#changeState(State.NewNote); this.#changeState(State.NewNote);
const globalKeyListener: (this: Window, ev: KeyboardEvent) => any = (e) => { const globalKeyListener: (this: Window, ev: KeyboardEvent) => any = (e) => {
if (e.key !== "Escape") {
return;
}
this.#changeState(State.Normal); this.#changeState(State.Normal);
window.removeEventListener("keydown", globalKeyListener); window.removeEventListener("keydown", globalKeyListener);