@primer/behaviors 0.0.0-202317223846 → 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.
- package/dist/cjs/focus-zone.js +2 -1
- package/dist/esm/focus-zone.js +2 -1
- package/package.json +1 -1
package/dist/cjs/focus-zone.js
CHANGED
|
@@ -246,7 +246,8 @@ function focusZone(container, settings) {
|
|
|
246
246
|
}
|
|
247
247
|
}
|
|
248
248
|
beginFocusManagement(...(0, iterate_focusable_elements_js_1.iterateFocusableElements)(container));
|
|
249
|
-
|
|
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) {
|
package/dist/esm/focus-zone.js
CHANGED
|
@@ -243,7 +243,8 @@ export function focusZone(container, settings) {
|
|
|
243
243
|
}
|
|
244
244
|
}
|
|
245
245
|
beginFocusManagement(...iterateFocusableElements(container));
|
|
246
|
-
|
|
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) {
|