fix Generate button state gets stuck sometimes when switching tabs #60

This commit is contained in:
anapnoe
2023-04-19 05:22:02 +03:00
parent 270c736227
commit c9b89f8af0
2 changed files with 14 additions and 4 deletions
+13 -3
View File
@@ -93,9 +93,19 @@ function requestProgress(id_task, progressbarContainer, gallery, atEnd, onProgre
var removeProgressBar = function(){
setTitle("")
parentProgressbar.removeChild(divProgress)
if(parentGallery) parentGallery.removeChild(livePreview)
atEnd()
if(divProgress){
parentProgressbar.removeChild(divProgress)
}
if(progressbarContainer.id == "txt2img_gallery_container"){
showSubmitButtons('txt2img', true);
}else if(progressbarContainer.id == "img2img_gallery_container"){
showSubmitButtons('img2img', true);
}
if(livePreview){
if(parentGallery) parentGallery.removeChild(livePreview)
}
atEnd()
}
var fun = function(id_task, id_live_preview){