power-focusable 4.1.6 → 4.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +5 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -155,6 +155,10 @@ function isFocusable(element) {
|
|
|
155
155
|
return true;
|
|
156
156
|
}
|
|
157
157
|
function getRelativeFocusable(container, offset, options) {
|
|
158
|
+
if (!(container instanceof Element)) {
|
|
159
|
+
console.warn("Invalid container element. Fallback: <body> element.");
|
|
160
|
+
container = document.body;
|
|
161
|
+
}
|
|
158
162
|
let {
|
|
159
163
|
anchor = getActiveElement(),
|
|
160
164
|
composed = false,
|
|
@@ -423,7 +427,7 @@ function isUngroupedRadio(element) {
|
|
|
423
427
|
* High-precision focus management utility with full composed tree support.
|
|
424
428
|
* Handles complex focus rules including tabindex ordering, radio groups, inert.
|
|
425
429
|
*
|
|
426
|
-
* @version 4.1.
|
|
430
|
+
* @version 4.1.7
|
|
427
431
|
* @author Yusuke Kamiyamane
|
|
428
432
|
* @license MIT
|
|
429
433
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
package/dist/index.d.cts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* High-precision focus management utility with full composed tree support.
|
|
4
4
|
* Handles complex focus rules including tabindex ordering, radio groups, inert.
|
|
5
5
|
*
|
|
6
|
-
* @version 4.1.
|
|
6
|
+
* @version 4.1.7
|
|
7
7
|
* @author Yusuke Kamiyamane
|
|
8
8
|
* @license MIT
|
|
9
9
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* High-precision focus management utility with full composed tree support.
|
|
4
4
|
* Handles complex focus rules including tabindex ordering, radio groups, inert.
|
|
5
5
|
*
|
|
6
|
-
* @version 4.1.
|
|
6
|
+
* @version 4.1.7
|
|
7
7
|
* @author Yusuke Kamiyamane
|
|
8
8
|
* @license MIT
|
|
9
9
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
package/dist/index.js
CHANGED
|
@@ -153,6 +153,10 @@ function isFocusable(element) {
|
|
|
153
153
|
return true;
|
|
154
154
|
}
|
|
155
155
|
function getRelativeFocusable(container, offset, options) {
|
|
156
|
+
if (!(container instanceof Element)) {
|
|
157
|
+
console.warn("Invalid container element. Fallback: <body> element.");
|
|
158
|
+
container = document.body;
|
|
159
|
+
}
|
|
156
160
|
let {
|
|
157
161
|
anchor = getActiveElement(),
|
|
158
162
|
composed = false,
|
|
@@ -421,7 +425,7 @@ function isUngroupedRadio(element) {
|
|
|
421
425
|
* High-precision focus management utility with full composed tree support.
|
|
422
426
|
* Handles complex focus rules including tabindex ordering, radio groups, inert.
|
|
423
427
|
*
|
|
424
|
-
* @version 4.1.
|
|
428
|
+
* @version 4.1.7
|
|
425
429
|
* @author Yusuke Kamiyamane
|
|
426
430
|
* @license MIT
|
|
427
431
|
* @copyright Copyright (c) Yusuke Kamiyamane
|