fix(geomap): dismissing add with any key

This commit is contained in:
Elian Doran 2025-01-21 21:50:32 +02:00
parent 31491b957b
commit 65553250b5
No known key found for this signature in database

View File

@ -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);