mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-10-17 20:20:40 +08:00
fix(geomap): dismissing add with any key
This commit is contained in:
parent
31491b957b
commit
65553250b5
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user