File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
app/frontend/src/components/designer Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -584,17 +584,25 @@ function formChange(e) {
584584 jsonManager ();
585585
586586 // AUTOSAVE – only when:
587+ // - autosave has been initialized
587588 // - form has enableAutoSave turned on
588589 // - not read-only or preview
589590 // - Form.io has valid _data
590- // - NOT a fromSubmission event (already checked above)
591+ // - user input (not fromSubmission event)
592+ // - NOT editing an existing submission
591593 if (
594+ autosaveInitialized .value &&
592595 form .value ? .enableAutoSave &&
593596 ! properties .readOnly &&
594597 ! properties .preview &&
595598 e .changed &&
596599 ! e .changed .flags ? .fromSubmission &&
597- chefForm .value ? .formio ? ._data
600+ chefForm .value ? .formio ? ._data &&
601+ ! (
602+ properties .submissionId &&
603+ properties .submissionId !== ' new' &&
604+ properties .submissionId !== ' undefined'
605+ )
598606 ) {
599607 localAutosave .save (chefForm .value .formio ._data );
600608 }
You can’t perform that action at this time.
0 commit comments