yfszzx / stable-diffusion-webui-images-browser

an images browse for stable-diffusion-webui
489 stars 235 forks source link

fix keyboard advance "generate info" #62

Closed liuhongboCM closed 1 year ago

liuhongboCM commented 1 year ago

At present, the keyboard forward and back advance the image, but does not cause the "generate info" of "filename" fields to update. This is because gradio doesn't have a keyboard event listener ,so I add a keyboard event listener using JS and fix this issue.

SquarePixelBoy commented 1 year ago

At present, the keyboard forward and back advance the image, but does not cause the "generate info" of "filename" fields to update. This is because gradio doesn't have a keyboard event listener ,so I add a keyboard event listener using JS and fix this issue.

Hi and thanks for your fix, but is possible to have the same behavior when we use keyboard forward and back on small thumbnails of the images. Now your fix work only when we use forw/back arrows on image at full screen, if I'm not mistaken. Thanks

62

Web UI Image Browser

ghost commented 1 year ago

Keyboard advance on the small thumbnails is working for me here. The timeout length just makes it slow to update the generate info but otherwise it's fine.

SquarePixelBoy commented 1 year ago

Hi, to explain me more, yesterday after the first fix the keyboard advance it was working only with the image on fullscreen mode, today i saw a new "commits" but after the update it didn't work for me, so i created a new comment, because I thought no one had read it, and I deleted the old comment. Then after 2 restart of UI it does work on the small thumbnails, for me too. So now keyboard advance it's rock. Thanks again for the fix, it's so useful.