aboutsummaryrefslogtreecommitdiffstats
path: root/javascript/ui.js
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2022-11-27 10:53:38 +0000
committerGitHub <noreply@github.com>2022-11-27 10:53:38 +0000
commitd46d73c3c2e9b1641ffb3fa34be6448828e3f863 (patch)
treefb435ed22f414810a47ab775f5d1a1267813a727 /javascript/ui.js
parent01f2ed684450b650f5802bce5c7bf061062781c7 (diff)
parent927d24ef82f0eedebabb908c43829388f413d73c (diff)
downloadstable-diffusion-webui-gfx803-d46d73c3c2e9b1641ffb3fa34be6448828e3f863.tar.gz
stable-diffusion-webui-gfx803-d46d73c3c2e9b1641ffb3fa34be6448828e3f863.tar.bz2
stable-diffusion-webui-gfx803-d46d73c3c2e9b1641ffb3fa34be6448828e3f863.zip
Merge pull request #4899 from liamkerr/fix_gallery_index
Fixed issue with selected_gallery_index()
Diffstat (limited to 'javascript/ui.js')
-rw-r--r--javascript/ui.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/javascript/ui.js b/javascript/ui.js
index 95cfd106..2ca66d79 100644
--- a/javascript/ui.js
+++ b/javascript/ui.js
@@ -8,8 +8,8 @@ function set_theme(theme){
}
function selected_gallery_index(){
- var buttons = gradioApp().querySelectorAll('[style="display: block;"].tabitem .gallery-item')
- var button = gradioApp().querySelector('[style="display: block;"].tabitem .gallery-item.\\!ring-2')
+ var buttons = gradioApp().querySelectorAll('[style="display: block;"].tabitem div[id$=_gallery] .gallery-item')
+ var button = gradioApp().querySelector('[style="display: block;"].tabitem div[id$=_gallery] .gallery-item.\\!ring-2')
var result = -1
buttons.forEach(function(v, i){ if(v==button) { result = i } })