aboutsummaryrefslogtreecommitdiffstats
path: root/javascript/imageviewer.js
diff options
context:
space:
mode:
authorw-e-w <40751091+w-e-w@users.noreply.github.com>2023-08-08 02:39:34 +0000
committerGitHub <noreply@github.com>2023-08-08 02:39:34 +0000
commitf17c8c2eff63210f5e96e1e2b049b46ba9cfa389 (patch)
tree701056aec9ae11bc45df9b39b176a54fa4d34e19 /javascript/imageviewer.js
parentc75bda867be5345bf959daf23bdc19eadc90841a (diff)
parent01997f45ba089af24b03a5f614147bb0f9d8d824 (diff)
downloadstable-diffusion-webui-gfx803-f17c8c2eff63210f5e96e1e2b049b46ba9cfa389.tar.gz
stable-diffusion-webui-gfx803-f17c8c2eff63210f5e96e1e2b049b46ba9cfa389.tar.bz2
stable-diffusion-webui-gfx803-f17c8c2eff63210f5e96e1e2b049b46ba9cfa389.zip
Merge branch 'dev' into auro-autolaunch
Diffstat (limited to 'javascript/imageviewer.js')
-rw-r--r--javascript/imageviewer.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/javascript/imageviewer.js b/javascript/imageviewer.js
index 677e95c1..c21d396e 100644
--- a/javascript/imageviewer.js
+++ b/javascript/imageviewer.js
@@ -136,6 +136,11 @@ function setupImageForLightbox(e) {
var event = isFirefox ? 'mousedown' : 'click';
e.addEventListener(event, function(evt) {
+ if (evt.button == 1) {
+ open(evt.target.src);
+ evt.preventDefault();
+ return;
+ }
if (!opts.js_modal_lightbox || evt.button != 0) return;
modalZoomSet(gradioApp().getElementById('modalImage'), opts.js_modal_lightbox_initially_zoomed);