@primer/behaviors 1.3.2-rc.b275ab5 → 1.3.3-rc.be41306
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/CHANGELOG.md +6 -0
- package/dist/cjs/focus-zone.js +2 -1
- package/dist/esm/focus-zone.js +2 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @primer/behaviors
|
|
2
2
|
|
|
3
|
+
## 1.3.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#180](https://github.com/primer/behaviors/pull/180) [`eca845b`](https://github.com/primer/behaviors/commit/eca845b9dbcd49383766ee55dfdcfa4fafbda4a6) Thanks [@colebemis](https://github.com/colebemis)! - FocusZone: If custom `focusInStrategy` is defined, use it to initialize tabIndexes
|
|
8
|
+
|
|
3
9
|
## 1.3.2
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/cjs/focus-zone.js
CHANGED
|
@@ -245,7 +245,8 @@ function focusZone(container, settings) {
|
|
|
245
245
|
}
|
|
246
246
|
}
|
|
247
247
|
beginFocusManagement(...(0, iterate_focusable_elements_js_1.iterateFocusableElements)(container));
|
|
248
|
-
|
|
248
|
+
const initialElement = typeof focusInStrategy === 'function' ? focusInStrategy(document.body) : getFirstFocusableElement();
|
|
249
|
+
updateFocusedElement(initialElement);
|
|
249
250
|
const observer = new MutationObserver(mutations => {
|
|
250
251
|
for (const mutation of mutations) {
|
|
251
252
|
for (const removedNode of mutation.removedNodes) {
|
package/dist/esm/focus-zone.js
CHANGED
|
@@ -242,7 +242,8 @@ export function focusZone(container, settings) {
|
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
244
|
beginFocusManagement(...iterateFocusableElements(container));
|
|
245
|
-
|
|
245
|
+
const initialElement = typeof focusInStrategy === 'function' ? focusInStrategy(document.body) : getFirstFocusableElement();
|
|
246
|
+
updateFocusedElement(initialElement);
|
|
246
247
|
const observer = new MutationObserver(mutations => {
|
|
247
248
|
for (const mutation of mutations) {
|
|
248
249
|
for (const removedNode of mutation.removedNodes) {
|