mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-30 08:55:12 -05:00
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:
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));
|
||||
|
||||
Reference in new issue
Block a user