mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-05-16 03:57:27 +08:00
patch: invalid close detection
This commit is contained in:
parent
dc6ac7def0
commit
de2539628b
@ -250,8 +250,9 @@ class MaskEditorDialog extends ComfyDialog {
|
|||||||
const observer = new MutationObserver(function(mutations) {
|
const observer = new MutationObserver(function(mutations) {
|
||||||
mutations.forEach(function(mutation) {
|
mutations.forEach(function(mutation) {
|
||||||
if (mutation.type === 'attributes' && mutation.attributeName === 'style') {
|
if (mutation.type === 'attributes' && mutation.attributeName === 'style') {
|
||||||
if(self.last_display_style && self.last_display_style != 'none')
|
if(self.last_display_style && self.last_display_style != 'none' && self.element.style.display == 'none') {
|
||||||
ComfyApp.onClipspaceEditorClosed();
|
ComfyApp.onClipspaceEditorClosed();
|
||||||
|
}
|
||||||
|
|
||||||
self.last_display_style = self.element.style.display;
|
self.last_display_style = self.element.style.display;
|
||||||
}
|
}
|
||||||
@ -270,6 +271,7 @@ class MaskEditorDialog extends ComfyDialog {
|
|||||||
else {
|
else {
|
||||||
this.saveButton.innerText = "Save";
|
this.saveButton.innerText = "Save";
|
||||||
}
|
}
|
||||||
|
this.saveButton.disabled = false;
|
||||||
|
|
||||||
this.element.style.display = "block";
|
this.element.style.display = "block";
|
||||||
this.element.style.zIndex = 8888; // NOTE: alert dialog must be high priority.
|
this.element.style.zIndex = 8888; // NOTE: alert dialog must be high priority.
|
||||||
@ -619,6 +621,8 @@ class MaskEditorDialog extends ComfyDialog {
|
|||||||
formData.append('type', "input");
|
formData.append('type', "input");
|
||||||
formData.append('subfolder', "clipspace");
|
formData.append('subfolder', "clipspace");
|
||||||
|
|
||||||
|
this.saveButton.innerText = "Saving...";
|
||||||
|
this.saveButton.disabled = true;
|
||||||
await uploadMask(item, formData);
|
await uploadMask(item, formData);
|
||||||
ComfyApp.onClipspaceEditorSave();
|
ComfyApp.onClipspaceEditorSave();
|
||||||
this.close();
|
this.close();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user