@primer/behaviors 0.0.0-20241107161818 → 0.0.0-20241107171019
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/cjs/focus-trap.js
CHANGED
|
@@ -62,7 +62,7 @@ function focusTrap(container, initialFocus, abortSignal) {
|
|
|
62
62
|
const firstFocusableChild = iterateFocusableElements.getFocusableChild(container);
|
|
63
63
|
firstFocusableChild === null || firstFocusableChild === void 0 ? void 0 : firstFocusableChild.focus();
|
|
64
64
|
};
|
|
65
|
-
const existingSentinels = Array.from(container.children).filter(e => e.classList.contains('sentinel'));
|
|
65
|
+
const existingSentinels = Array.from(container.children).filter(e => e.classList.contains('sentinel') && e.tagName === 'SPAN');
|
|
66
66
|
if (!existingSentinels.length) {
|
|
67
67
|
container.prepend(sentinelStart);
|
|
68
68
|
container.append(sentinelEnd);
|
package/dist/esm/focus-trap.mjs
CHANGED
|
@@ -60,7 +60,7 @@ function focusTrap(container, initialFocus, abortSignal) {
|
|
|
60
60
|
const firstFocusableChild = getFocusableChild(container);
|
|
61
61
|
firstFocusableChild === null || firstFocusableChild === void 0 ? void 0 : firstFocusableChild.focus();
|
|
62
62
|
};
|
|
63
|
-
const existingSentinels = Array.from(container.children).filter(e => e.classList.contains('sentinel'));
|
|
63
|
+
const existingSentinels = Array.from(container.children).filter(e => e.classList.contains('sentinel') && e.tagName === 'SPAN');
|
|
64
64
|
if (!existingSentinels.length) {
|
|
65
65
|
container.prepend(sentinelStart);
|
|
66
66
|
container.append(sentinelEnd);
|