This commit is contained in:
vladmandic
2026-01-20 10:09:02 +01:00
3 changed files with 90 additions and 4 deletions
+4
View File
@@ -64,6 +64,10 @@ function selected_gallery_index() {
const button = selected_gallery_button();
let result = -1;
buttons.forEach((v, i) => { if (v === button) { result = i; } });
if (result === -1 && gradioApp().getElementById('tab-gallery-search')?.checkVisibility()) {
const gallerySelection = window.getGallerySelection();
if (Number.isInteger(gallerySelection.index)) result = gallerySelection.index;
}
return result;
}