mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-10 02:02:29 +08:00
feat(geomap): dismiss adding with escape
This commit is contained in:
parent
c2cb07ed08
commit
be4ee4c173
@ -258,6 +258,14 @@ export default class GeoMapTypeWidget extends TypeWidget {
|
||||
|
||||
this.state = State.NewNote;
|
||||
this.#adjustCursor();
|
||||
|
||||
const globalKeyListener: (this: Window, ev: KeyboardEvent) => any = (e) => {
|
||||
this.state = State.Normal;
|
||||
this.#adjustCursor();
|
||||
|
||||
window.removeEventListener("keydown", globalKeyListener);
|
||||
};
|
||||
window.addEventListener("keydown", globalKeyListener);
|
||||
}
|
||||
|
||||
async doRefresh(note: FNote) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user