@primer/behaviors 0.0.0-20241107161818 → 0.0.0-20241107171114

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.
@@ -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);
@@ -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);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primer/behaviors",
3
- "version": "0.0.0-20241107161818",
3
+ "version": "0.0.0-20241107171114",
4
4
  "description": "Shared behaviors for JavaScript components",
5
5
  "type": "commonjs",
6
6
  "main": "dist/cjs/index.js",