fix: saving a model asks "Discard unsaved changes?" right after the save (#34110)

Since the workspace pages open as tabs, saving a changed model showed the success message and then the "Discard unsaved changes?" dialog, although the change was already saved, and the model editor stayed open until the dialog was confirmed. Saving now goes straight back to the model list again, as in v0.13.3.

Fixes #34087
This commit is contained in:
Classic298 authored and GitHub committed 2026-11-16 21:03:00 +09:00
1 parent abcebd7d0d
commit 6a67b5b017
1 file changed
+1 -1
@@ -124,7 +124,7 @@
};
let cancelDiscard: (() => void) | null = null;
onTabLeave(() => {
if (readOnly || !dirty) return true;
if (readOnly || !dirty || allowNavigation) return true;
return new Promise<boolean>((resolve) => {
cancelDiscard = () => resolve(false);
discardThen(() => resolve(true));