@primer/behaviors 0.0.0-20231722480 → 0.0.0-202317231443
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 +3 -3
- package/dist/esm/focus-zone.js +3 -3
- package/package.json +1 -1
package/dist/cjs/focus-zone.js
CHANGED
|
@@ -198,8 +198,7 @@ function focusZone(container, settings) {
|
|
|
198
198
|
element.setAttribute('tabindex', '-1');
|
|
199
199
|
}
|
|
200
200
|
if (!currentFocusedElement) {
|
|
201
|
-
|
|
202
|
-
updateFocusedElement(initialElement);
|
|
201
|
+
updateFocusedElement(getFirstFocusableElement());
|
|
203
202
|
}
|
|
204
203
|
}
|
|
205
204
|
function findInsertionIndex(elementsToInsert) {
|
|
@@ -246,7 +245,8 @@ function focusZone(container, settings) {
|
|
|
246
245
|
}
|
|
247
246
|
}
|
|
248
247
|
beginFocusManagement(...(0, iterate_focusable_elements_js_1.iterateFocusableElements)(container));
|
|
249
|
-
|
|
248
|
+
const initialElement = typeof focusInStrategy === 'function' ? focusInStrategy(document.body) : getFirstFocusableElement();
|
|
249
|
+
updateFocusedElement(initialElement);
|
|
250
250
|
const observer = new MutationObserver(mutations => {
|
|
251
251
|
for (const mutation of mutations) {
|
|
252
252
|
for (const removedNode of mutation.removedNodes) {
|
package/dist/esm/focus-zone.js
CHANGED
|
@@ -195,8 +195,7 @@ export function focusZone(container, settings) {
|
|
|
195
195
|
element.setAttribute('tabindex', '-1');
|
|
196
196
|
}
|
|
197
197
|
if (!currentFocusedElement) {
|
|
198
|
-
|
|
199
|
-
updateFocusedElement(initialElement);
|
|
198
|
+
updateFocusedElement(getFirstFocusableElement());
|
|
200
199
|
}
|
|
201
200
|
}
|
|
202
201
|
function findInsertionIndex(elementsToInsert) {
|
|
@@ -243,7 +242,8 @@ export function focusZone(container, settings) {
|
|
|
243
242
|
}
|
|
244
243
|
}
|
|
245
244
|
beginFocusManagement(...iterateFocusableElements(container));
|
|
246
|
-
|
|
245
|
+
const initialElement = typeof focusInStrategy === 'function' ? focusInStrategy(document.body) : getFirstFocusableElement();
|
|
246
|
+
updateFocusedElement(initialElement);
|
|
247
247
|
const observer = new MutationObserver(mutations => {
|
|
248
248
|
for (const mutation of mutations) {
|
|
249
249
|
for (const removedNode of mutation.removedNodes) {
|