force lightbox

This commit is contained in:
Vladimir Mandic
2023-04-29 18:18:08 -04:00
parent 6cd4d62f71
commit 1469f8c69c
+2 -2
View File
@@ -105,8 +105,8 @@ function setupImageForLightbox(e) {
var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1
var event = isFirefox ? 'mousedown' : 'click'
e.addEventListener(event, function (evt) {
if(!opts.js_modal_lightbox || evt.button != 0) return;
modalZoomSet(gradioApp().getElementById('modalImage'), opts.js_modal_lightbox_initially_zoomed)
if (evt.button != 0) return;
modalZoomSet(gradioApp().getElementById('modalImage'), true)
evt.preventDefault()
showModal(evt)
}, true);