Browse Source

Fix #139 - focus on hidden elements

pull/165/head
Jānis Skarnelis 3 years ago
parent
commit
b38d18a9f3
  1. 2
      dist/fancybox.esm.js
  2. 2
      dist/fancybox.umd.js
  3. 4
      src/Fancybox/Fancybox.js

2
dist/fancybox.esm.js

File diff suppressed because one or more lines are too long

2
dist/fancybox.umd.js

File diff suppressed because one or more lines are too long

4
src/Fancybox/Fancybox.js

@ -695,7 +695,9 @@ class Fancybox extends Base {
for (let node of allFocusableElems) {
const isInsideSlide = $currentSlide.contains(node);
if (isInsideSlide || !this.Carousel.$viewport.contains(node)) {
// Enable element if it's visible and is inside current slide or
// not inside main carousel , e.g., not inside previous/next slide, but located, for example, inside the toolbar
if (node.offsetParent && (isInsideSlide || !this.Carousel.$viewport.contains(node))) {
enabledElems.push(node);
if (node.dataset.origTabindex !== undefined) {

Loading…
Cancel
Save