@primer/behaviors 0.0.0-20231722480 → 0.0.0-202317225018

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.
@@ -246,7 +246,8 @@ function focusZone(container, settings) {
246
246
  }
247
247
  }
248
248
  beginFocusManagement(...(0, iterate_focusable_elements_js_1.iterateFocusableElements)(container));
249
- updateFocusedElement(getFirstFocusableElement());
249
+ const initialElement = typeof focusInStrategy === 'function' ? focusInStrategy(document.body) : getFirstFocusableElement();
250
+ updateFocusedElement(initialElement);
250
251
  const observer = new MutationObserver(mutations => {
251
252
  for (const mutation of mutations) {
252
253
  for (const removedNode of mutation.removedNodes) {
@@ -243,7 +243,8 @@ export function focusZone(container, settings) {
243
243
  }
244
244
  }
245
245
  beginFocusManagement(...iterateFocusableElements(container));
246
- updateFocusedElement(getFirstFocusableElement());
246
+ const initialElement = typeof focusInStrategy === 'function' ? focusInStrategy(document.body) : getFirstFocusableElement();
247
+ updateFocusedElement(initialElement);
247
248
  const observer = new MutationObserver(mutations => {
248
249
  for (const mutation of mutations) {
249
250
  for (const removedNode of mutation.removedNodes) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primer/behaviors",
3
- "version": "0.0.0-20231722480",
3
+ "version": "0.0.0-202317225018",
4
4
  "description": "Shared behaviors for JavaScript components",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",