mirror of
https://github.com/vladmandic/automatic
synced 2026-08-31 01:20:59 +02:00
fix lightbox
This commit is contained in:
@@ -11,7 +11,7 @@ onUiUpdate(function(){
|
||||
});
|
||||
|
||||
let modalObserver = new MutationObserver(function(mutations) {
|
||||
mutations.forEach(function(mutationRecord) {
|
||||
mutations.forEach((mutationRecord) => {
|
||||
let selectedTab = gradioApp().querySelector('#tabs div button.selected')?.innerText
|
||||
if (!selectedTab) selectedTab = gradioApp().querySelector('#tabs div button')?.innerText
|
||||
if (mutationRecord.target.style.display === 'none' && (selectedTab === 'txt2img' || selectedTab === 'img2img'))
|
||||
|
||||
@@ -212,6 +212,6 @@ document.addEventListener("DOMContentLoaded", function() {
|
||||
|
||||
modal.appendChild(modalNext)
|
||||
|
||||
try { gadioApp().appendChild(modal); }
|
||||
try { gradioApp().appendChild(modal); }
|
||||
catch (e) { gradioApp().body.appendChild(modal); }
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user