@aurodesignsystem/auro-library 5.13.0 → 5.13.1
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
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Semantic Release Automated Changelog
|
|
2
2
|
|
|
3
|
+
## [5.13.1](https://github.com/AlaskaAirlines/auro-library/compare/v5.13.0...v5.13.1) (2026-07-10)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **floatingUI:** handle focus loss in Chrome during popover promotion ([511b2a0](https://github.com/AlaskaAirlines/auro-library/commit/511b2a04ffb28b421d183f1a192fea59e7082c4c))
|
|
9
|
+
* **floatingUI:** update hideBib method to differentiate focus loss events ([632366f](https://github.com/AlaskaAirlines/auro-library/commit/632366f24b2aa66455c9024f0538a588e7e8f9d1))
|
|
10
|
+
|
|
3
11
|
# [5.13.0](https://github.com/AlaskaAirlines/auro-library/compare/v5.12.3...v5.13.0) (2026-05-14)
|
|
4
12
|
|
|
5
13
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aurodesignsystem/auro-library",
|
|
3
|
-
"version": "5.13.
|
|
3
|
+
"version": "5.13.1",
|
|
4
4
|
"description": "This repository holds shared scripts, utilities, and workflows utilized across repositories along the Auro Design System.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -526,12 +526,40 @@ export default class AuroFloatingUI {
|
|
|
526
526
|
return;
|
|
527
527
|
}
|
|
528
528
|
|
|
529
|
+
// Chrome-specific: during popover top-layer promotion after a click on a
|
|
530
|
+
// slotted focusable, :focus-within can briefly evaluate false while the
|
|
531
|
+
// active element is still structurally inside the trigger/bib. Fall back
|
|
532
|
+
// to a shadow-piercing ancestry walk from the deep active element before
|
|
533
|
+
// treating this as a real focus loss.
|
|
534
|
+
try {
|
|
535
|
+
let active = document.activeElement;
|
|
536
|
+
while (active && active.shadowRoot && active.shadowRoot.activeElement) {
|
|
537
|
+
active = active.shadowRoot.activeElement;
|
|
538
|
+
}
|
|
539
|
+
const targets = [element, element.trigger, element.bib].filter(Boolean);
|
|
540
|
+
let node = active;
|
|
541
|
+
while (node) {
|
|
542
|
+
if (targets.includes(node)) {
|
|
543
|
+
return;
|
|
544
|
+
}
|
|
545
|
+
node =
|
|
546
|
+
node.parentElement ||
|
|
547
|
+
(node.getRootNode && node.getRootNode().host) ||
|
|
548
|
+
null;
|
|
549
|
+
}
|
|
550
|
+
} catch (e) {
|
|
551
|
+
// Defensive: fall through to the existing close path if traversal fails.
|
|
552
|
+
}
|
|
553
|
+
|
|
529
554
|
// if fullscreen bib is in fullscreen mode, do not close
|
|
530
555
|
if (element.bib.hasAttribute("isfullscreen")) {
|
|
531
556
|
return;
|
|
532
557
|
}
|
|
533
558
|
|
|
534
|
-
|
|
559
|
+
// eventType "focusloss" distinguishes a Tab/click-driven close from an
|
|
560
|
+
// Escape keydown close. Consumers use this to decide whether to restore
|
|
561
|
+
// focus to the trigger (Escape) or let it advance naturally (Tab).
|
|
562
|
+
this.hideBib("focusloss");
|
|
535
563
|
}
|
|
536
564
|
|
|
537
565
|
setupHideHandlers() {
|
|
@@ -86,7 +86,7 @@ describe("AuroFloatingUI", () => {
|
|
|
86
86
|
expect(hideBibSpy.called).to.be.false;
|
|
87
87
|
});
|
|
88
88
|
|
|
89
|
-
it("hides with a
|
|
89
|
+
it("hides with a focus loss event when the host no longer has focus", () => {
|
|
90
90
|
const checkedSelectors = [];
|
|
91
91
|
|
|
92
92
|
sinon.stub(host, "matches").callsFake((selector) => {
|
|
@@ -97,7 +97,7 @@ describe("AuroFloatingUI", () => {
|
|
|
97
97
|
floatingUI.handleFocusLoss();
|
|
98
98
|
|
|
99
99
|
expect(checkedSelectors).to.deep.equal([":focus", ":focus-within"]);
|
|
100
|
-
expect(hideBibSpy.calledOnceWithExactly("
|
|
100
|
+
expect(hideBibSpy.calledOnceWithExactly("focusloss")).to.be.true;
|
|
101
101
|
});
|
|
102
102
|
|
|
103
103
|
it("no-ops safely when element is not set", () => {
|