From a5dbe54d56be247c2904c533ea6c8c6bcb84b7df Mon Sep 17 00:00:00 2001 From: Ere Maijala Date: Fri, 31 Jan 2025 11:36:00 +0200 Subject: [PATCH] Fix initial focus handling in lightbox with Bootstrap 5. --- themes/bootstrap5/js/lightbox.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/themes/bootstrap5/js/lightbox.js b/themes/bootstrap5/js/lightbox.js index b86ccd91648..bcb164818d9 100644 --- a/themes/bootstrap5/js/lightbox.js +++ b/themes/bootstrap5/js/lightbox.js @@ -368,8 +368,8 @@ VuFind.register('lightbox', function Lightbox() { // remove nodes on whose click, the modal closes var nodesWhichAreNotCloseTargets = focusableNodes.filter(function nodeFilter(node) { return !node.hasAttribute("data-lightbox-close") && ( - !node.hasAttribute("data-dismiss") || - node.getAttribute("data-dismiss") !== "modal" + !node.hasAttribute("data-bs-dismiss") || + node.getAttribute("data-bs-dismiss") !== "modal" ); });