From dc6ac7def0141e898d48ad18ed0418395aa5eed7 Mon Sep 17 00:00:00 2001 From: "Dr.Lt.Data" Date: Sat, 13 May 2023 13:53:03 +0900 Subject: [PATCH] bugfix about last patch --- web/extensions/core/maskeditor.js | 6 +++--- web/scripts/app.js | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/web/extensions/core/maskeditor.js b/web/extensions/core/maskeditor.js index 6b698e2b9..ef1449540 100644 --- a/web/extensions/core/maskeditor.js +++ b/web/extensions/core/maskeditor.js @@ -250,10 +250,10 @@ class MaskEditorDialog extends ComfyDialog { const observer = new MutationObserver(function(mutations) { mutations.forEach(function(mutation) { if (mutation.type === 'attributes' && mutation.attributeName === 'style') { - if(self.last_style && self.last_style != 'none') + if(self.last_display_style && self.last_display_style != 'none') ComfyApp.onClipspaceEditorClosed(); - self.last_style = self.element.style; + self.last_display_style = self.element.style.display; } }); }); @@ -620,8 +620,8 @@ class MaskEditorDialog extends ComfyDialog { formData.append('subfolder', "clipspace"); await uploadMask(item, formData); + ComfyApp.onClipspaceEditorSave(); this.close(); - ComfyApp.onClipspaceEditorClosed(true); } } diff --git a/web/scripts/app.js b/web/scripts/app.js index 86e991bd9..6dec31b94 100644 --- a/web/scripts/app.js +++ b/web/scripts/app.js @@ -57,8 +57,7 @@ export class ComfyApp { static onClipspaceEditorSave() { if(ComfyApp.clipspace_return_node) { - if(save_mode) - ComfyApp.pasteToClipspace(ComfyApp.clipspace_return_node); + ComfyApp.pasteToClipspace(ComfyApp.clipspace_return_node); } }