@primer/behaviors 0.0.0-20240821180823 → 0.0.0-20240821183620
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
|
@@ -23,7 +23,7 @@ function observeFocusTrap(container, sentinels) {
|
|
|
23
23
|
const observer = new MutationObserver(mutations => {
|
|
24
24
|
for (const mutation of mutations) {
|
|
25
25
|
if (mutation.type === 'childList' && mutation.addedNodes.length) {
|
|
26
|
-
const sentinelChildren = Array.from(mutation.addedNodes
|
|
26
|
+
const sentinelChildren = Array.from(mutation.addedNodes).filter(e => e instanceof HTMLElement && e.classList.contains('sentinel') && e.tagName === 'SPAN');
|
|
27
27
|
if (sentinelChildren.length) {
|
|
28
28
|
return;
|
|
29
29
|
}
|
package/dist/esm/focus-trap.mjs
CHANGED
|
@@ -21,7 +21,7 @@ function observeFocusTrap(container, sentinels) {
|
|
|
21
21
|
const observer = new MutationObserver(mutations => {
|
|
22
22
|
for (const mutation of mutations) {
|
|
23
23
|
if (mutation.type === 'childList' && mutation.addedNodes.length) {
|
|
24
|
-
const sentinelChildren = Array.from(mutation.addedNodes
|
|
24
|
+
const sentinelChildren = Array.from(mutation.addedNodes).filter(e => e instanceof HTMLElement && e.classList.contains('sentinel') && e.tagName === 'SPAN');
|
|
25
25
|
if (sentinelChildren.length) {
|
|
26
26
|
return;
|
|
27
27
|
}
|