Unverified Commit 7393fdef authored by AUTOMATIC1111's avatar AUTOMATIC1111 Committed by GitHub
Browse files

Merge pull request #9060 from AlUlkesh/master

fix: lightboxModal, selectedTab
parents d2f3f40a 5a25826d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@ onUiUpdate(function(){

let modalObserver = new MutationObserver(function(mutations) {
	mutations.forEach(function(mutationRecord) {
		let selectedTab = gradioApp().querySelector('#tabs div button.bg-white')?.innerText
		let selectedTab = gradioApp().querySelector('#tabs div button')?.innerText
		if (mutationRecord.target.style.display === 'none' && selectedTab === 'txt2img' || selectedTab === 'img2img')
			gradioApp().getElementById(selectedTab+"_generation_info_button").click()
	});
+5 −2
Original line number Diff line number Diff line
@@ -251,8 +251,11 @@ document.addEventListener("DOMContentLoaded", function() {

    modal.appendChild(modalNext)

    gradioApp().appendChild(modal)

    try {
		gradioApp().appendChild(modal);
	} catch (e) {
		gradioApp().body.appendChild(modal);
	}

    document.body.appendChild(modal);