From a72a311328e244f83edd912d0ad32c0d40904052 Mon Sep 17 00:00:00 2001 From: Olivia206 <olivia.simonet206@gmail.com> Date: Wed, 21 Feb 2024 15:09:20 +0100 Subject: [PATCH] oups --- assets/js/vendors/lightbox.js | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/assets/js/vendors/lightbox.js b/assets/js/vendors/lightbox.js index dd58b5fb..b2cb7617 100644 --- a/assets/js/vendors/lightbox.js +++ b/assets/js/vendors/lightbox.js @@ -1,24 +1,6 @@ import gLightbox from 'glightbox'; -let lightboxBtn; - -const lightbox = gLightbox({ +gLightbox({ openEffect: 'fade', - closeEffect: 'fade', - onOpen: () => { - lightboxBtn = document.activeElement; - }, - onClose: () => { - if (lightboxBtn) { - lightboxBtn.focus(); - } - } + closeEffect: 'fade' }); - -lightbox.on('slide_changed', () => { - const currentSlide = document.querySelector('.gslide.current'); - if (currentSlide) { - currentSlide.setAttribute("tabindex", "0"); - currentSlide.focus(); - } -}); \ No newline at end of file -- GitLab