diff --git a/CHANGELOG.md b/CHANGELOG.md index c67d014771..2100478100 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ No changes to highlight. ## Bug Fixes: -No changes to highlight. +- Fix bug where `select` event was not triggered in `gr.Gallery` if `height` was set to be large with `allow_preview=False` by [@freddyaboulton](https://github.com/freddyaboulton) in [PR 4551](https://github.com/gradio-app/gradio/pull/4551) ## Other Changes: diff --git a/js/gallery/src/Gallery.svelte b/js/gallery/src/Gallery.svelte index 7525be0677..82d9779ad7 100644 --- a/js/gallery/src/Gallery.svelte +++ b/js/gallery/src/Gallery.svelte @@ -130,7 +130,8 @@ }); } - $: can_zoom = window_height >= client_height; + // If you don't allow preview, assume can always zoom to trigger select event + $: can_zoom = !allow_preview ? true : window_height >= client_height; let client_height = 0; let window_height = 0;