We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b957dcf commit f81931cCopy full SHA for f81931c
script.js
@@ -10,12 +10,18 @@ function gradioApp() {
10
return elem.shadowRoot ? elem.shadowRoot : elem;
11
}
12
13
+/**
14
+ * Get the currently selected top-level UI tab button (e.g. the button that says "Extras").
15
+ */
16
function get_uiCurrentTab() {
- return gradioApp().querySelector('#tabs button.selected');
17
+ return gradioApp().querySelector('#tabs > .tab-nav > button.selected');
18
19
20
21
+ * Get the first currently visible top-level UI tab content (e.g. the div hosting the "txt2img" UI).
22
23
function get_uiCurrentTabContent() {
- return gradioApp().querySelector('.tabitem[id^=tab_]:not([style*="display: none"])');
24
+ return gradioApp().querySelector('#tabs > .tabitem[id^=tab_]:not([style*="display: none"])');
25
26
27
var uiUpdateCallbacks = [];
0 commit comments