mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-10-19 05:01:33 +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);
|
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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user