Fix keyboard navigation in modal image viewer

This commit is contained in:
Alexey Shirokov 2023-01-11 11:41:50 +03:00 committed by GitHub
parent 1a23dc32ac
commit b202714b65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -151,6 +151,7 @@ function showGalleryImage() {
e.addEventListener('mousedown', function (evt) { e.addEventListener('mousedown', function (evt) {
if(!opts.js_modal_lightbox || evt.button != 0) return; if(!opts.js_modal_lightbox || evt.button != 0) return;
modalZoomSet(gradioApp().getElementById('modalImage'), opts.js_modal_lightbox_initially_zoomed) modalZoomSet(gradioApp().getElementById('modalImage'), opts.js_modal_lightbox_initially_zoomed)
evt.preventDefault()
showModal(evt) showModal(evt)
}, true); }, true);
} }