focus-lock
Advanced tools
Comparing version 1.3.3 to 1.3.4
@@ -42,2 +42,4 @@ import { getTabbableNodes } from './utils/DOMutils'; | ||
var left = (_b = line.left) === null || _b === void 0 ? void 0 : _b.call(line); | ||
var savedCurrent = line.current(); | ||
var current = parent_1.contains(savedCurrent) ? savedCurrent : undefined; | ||
var right = (_c = line.right) === null || _c === void 0 ? void 0 : _c.call(line); | ||
@@ -47,6 +49,8 @@ var focusables = getTabbableNodes([parent_1], visibilityCache); | ||
// that is element itself | ||
(_e = (_d = left === null || left === void 0 ? void 0 : left.nextElementSibling) !== null && _d !== void 0 ? _d : | ||
// or somebody to the right? | ||
(_e = (_d = current !== null && current !== void 0 ? current : | ||
// or something in it's place | ||
left === null || left === void 0 ? void 0 : left.nextElementSibling) !== null && _d !== void 0 ? _d : | ||
// or somebody to the right, still close enough | ||
right) !== null && _e !== void 0 ? _e : | ||
// or somebody to the left | ||
// or somebody to the left, something? | ||
left; | ||
@@ -53,0 +57,0 @@ while (aim) { |
@@ -41,2 +41,4 @@ import { getTabbableNodes } from './utils/DOMutils'; | ||
const left = (_b = line.left) === null || _b === void 0 ? void 0 : _b.call(line); | ||
const savedCurrent = line.current(); | ||
const current = parent.contains(savedCurrent) ? savedCurrent : undefined; | ||
const right = (_c = line.right) === null || _c === void 0 ? void 0 : _c.call(line); | ||
@@ -46,6 +48,8 @@ const focusables = getTabbableNodes([parent], visibilityCache); | ||
// that is element itself | ||
(_e = (_d = left === null || left === void 0 ? void 0 : left.nextElementSibling) !== null && _d !== void 0 ? _d : | ||
// or somebody to the right? | ||
(_e = (_d = current !== null && current !== void 0 ? current : | ||
// or something in it's place | ||
left === null || left === void 0 ? void 0 : left.nextElementSibling) !== null && _d !== void 0 ? _d : | ||
// or somebody to the right, still close enough | ||
right) !== null && _e !== void 0 ? _e : | ||
// or somebody to the left | ||
// or somebody to the left, something? | ||
left; | ||
@@ -52,0 +56,0 @@ while (aim) { |
@@ -46,2 +46,4 @@ "use strict"; | ||
var left = (_b = line.left) === null || _b === void 0 ? void 0 : _b.call(line); | ||
var savedCurrent = line.current(); | ||
var current = parent_1.contains(savedCurrent) ? savedCurrent : undefined; | ||
var right = (_c = line.right) === null || _c === void 0 ? void 0 : _c.call(line); | ||
@@ -51,6 +53,8 @@ var focusables = (0, DOMutils_1.getTabbableNodes)([parent_1], visibilityCache); | ||
// that is element itself | ||
(_e = (_d = left === null || left === void 0 ? void 0 : left.nextElementSibling) !== null && _d !== void 0 ? _d : | ||
// or somebody to the right? | ||
(_e = (_d = current !== null && current !== void 0 ? current : | ||
// or something in it's place | ||
left === null || left === void 0 ? void 0 : left.nextElementSibling) !== null && _d !== void 0 ? _d : | ||
// or somebody to the right, still close enough | ||
right) !== null && _e !== void 0 ? _e : | ||
// or somebody to the left | ||
// or somebody to the left, something? | ||
left; | ||
@@ -57,0 +61,0 @@ while (aim) { |
{ | ||
"name": "focus-lock", | ||
"version": "1.3.3", | ||
"version": "1.3.4", | ||
"description": "DOM trap for a focus", | ||
@@ -5,0 +5,0 @@ "main": "dist/es5/index.js", |
186086
4425