From d52d4a0e4195a71378e5a0beafa5403f128ab9a2 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Wed, 23 Nov 2022 08:15:38 -0800 Subject: [PATCH] fix auto-save. --- packages/editor/src/classes/model/editor/index.ts | 1 - .../src/components/action-widget/pane/topic-note/index.tsx | 2 +- packages/editor/src/components/index.tsx | 1 + 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/editor/src/classes/model/editor/index.ts b/packages/editor/src/classes/model/editor/index.ts index 3242b019..28e64d14 100644 --- a/packages/editor/src/classes/model/editor/index.ts +++ b/packages/editor/src/classes/model/editor/index.ts @@ -83,7 +83,6 @@ class Editor { // Is the save action enabled ... ? if (!capability.isHidden('save')) { // Register unload save ... - window.addEventListener('beforeunload', () => { this.component.save(false); this.component.unlockMap(); diff --git a/packages/editor/src/components/action-widget/pane/topic-note/index.tsx b/packages/editor/src/components/action-widget/pane/topic-note/index.tsx index 6ca0f69d..f3d53ac3 100644 --- a/packages/editor/src/components/action-widget/pane/topic-note/index.tsx +++ b/packages/editor/src/components/action-widget/pane/topic-note/index.tsx @@ -49,7 +49,7 @@ const TopicNote = (props: { margin="dense" value={note} onChange={(event) => setNote(event.target.value)} - > + />
{ const model = new Model(component); + model.registerEvents(setCanvasUpdate, capability); // Force refresh after map load ... model