@primer/behaviors 0.0.0-20251215031129 → 0.0.0-20251215033125
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
CHANGED
|
@@ -203,7 +203,9 @@ function focusZone(container, settings) {
|
|
|
203
203
|
activeDescendantCallback === null || activeDescendantCallback === void 0 ? void 0 : activeDescendantCallback(undefined, previouslyActiveElement, false);
|
|
204
204
|
}
|
|
205
205
|
function beginFocusManagement(...elements) {
|
|
206
|
-
const filteredElements =
|
|
206
|
+
const filteredElements = (settings === null || settings === void 0 ? void 0 : settings.focusableElementFilter)
|
|
207
|
+
? elements.filter(e => settings.focusableElementFilter(e))
|
|
208
|
+
: elements;
|
|
207
209
|
if (filteredElements.length === 0) {
|
|
208
210
|
return;
|
|
209
211
|
}
|
|
@@ -336,6 +338,7 @@ function focusZone(container, settings) {
|
|
|
336
338
|
signal.addEventListener('abort', () => {
|
|
337
339
|
observer.disconnect();
|
|
338
340
|
endFocusManagement(...focusableElements);
|
|
341
|
+
focusableElements.clear();
|
|
339
342
|
});
|
|
340
343
|
let elementIndexFocusedByClick = undefined;
|
|
341
344
|
container.addEventListener('mousedown', event => {
|
package/dist/esm/focus-zone.mjs
CHANGED
|
@@ -201,7 +201,9 @@ function focusZone(container, settings) {
|
|
|
201
201
|
activeDescendantCallback === null || activeDescendantCallback === void 0 ? void 0 : activeDescendantCallback(undefined, previouslyActiveElement, false);
|
|
202
202
|
}
|
|
203
203
|
function beginFocusManagement(...elements) {
|
|
204
|
-
const filteredElements =
|
|
204
|
+
const filteredElements = (settings === null || settings === void 0 ? void 0 : settings.focusableElementFilter)
|
|
205
|
+
? elements.filter(e => settings.focusableElementFilter(e))
|
|
206
|
+
: elements;
|
|
205
207
|
if (filteredElements.length === 0) {
|
|
206
208
|
return;
|
|
207
209
|
}
|
|
@@ -334,6 +336,7 @@ function focusZone(container, settings) {
|
|
|
334
336
|
signal.addEventListener('abort', () => {
|
|
335
337
|
observer.disconnect();
|
|
336
338
|
endFocusManagement(...focusableElements);
|
|
339
|
+
focusableElements.clear();
|
|
337
340
|
});
|
|
338
341
|
let elementIndexFocusedByClick = undefined;
|
|
339
342
|
container.addEventListener('mousedown', event => {
|