Merge pull request #5447 from apolinario/patch-1

Fix WebUI not working inside of iframes
This commit is contained in:
AUTOMATIC1111 2022-12-10 16:30:16 +03:00 committed by GitHub
commit 7cea280a8f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,5 +1,6 @@
function gradioApp(){ function gradioApp() {
return document.getElementsByTagName('gradio-app')[0].shadowRoot; const gradioShadowRoot = document.getElementsByTagName('gradio-app')[0].shadowRoot
return !!gradioShadowRoot ? gradioShadowRoot : document;
} }
function get_uiCurrentTab() { function get_uiCurrentTab() {
@ -82,4 +83,4 @@ function uiElementIsVisible(el) {
} }
} }
return isVisible; return isVisible;
} }