@aurodesignsystem/auro-library 5.12.1 → 5.12.2

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,12 @@
1
1
  # Semantic Release Automated Changelog
2
2
 
3
+ ## [5.12.2](https://github.com/AlaskaAirlines/auro-library/compare/v5.12.1...v5.12.2) (2026-04-09)
4
+
5
+
6
+ ### Performance Improvements
7
+
8
+ * add touch handler to floatingUI ([c89a29c](https://github.com/AlaskaAirlines/auro-library/commit/c89a29c5d9ce5945f52ee3e00f79a648e5da6ca7))
9
+
3
10
  ## [5.12.1](https://github.com/AlaskaAirlines/auro-library/compare/v5.12.0...v5.12.1) (2026-04-07)
4
11
 
5
12
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aurodesignsystem/auro-library",
3
- "version": "5.12.1",
3
+ "version": "5.12.2",
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",
@@ -70,6 +70,7 @@ export default class AuroFloatingUI {
70
70
  this.focusHandler = null;
71
71
  this.clickHandler = null;
72
72
  this.keyDownHandler = null;
73
+ this.touchHandler = null;
73
74
 
74
75
  /**
75
76
  * @private
@@ -487,6 +488,28 @@ export default class AuroFloatingUI {
487
488
  setTimeout(() => {
488
489
  window.addEventListener("click", this.clickHandler);
489
490
  }, 0);
491
+
492
+ // iOS Safari does not fire `click` on non-interactive elements, so
493
+ // tapping an inert backdrop never reaches the click handler above.
494
+ // Mirror the same outside-tap logic with a passive touchstart listener.
495
+ this.touchHandler = (evt) => {
496
+ const element = this.element;
497
+ if (!element?.bib) {
498
+ return;
499
+ }
500
+
501
+ // fullscreen (modal) dialog handles its own dismissal
502
+ if (element.bib.hasAttribute("isfullscreen")) {
503
+ return;
504
+ }
505
+
506
+ const path = evt.composedPath();
507
+ if (!path.includes(element.trigger) && !path.includes(element.bib)) {
508
+ this.hideBib("click");
509
+ }
510
+ };
511
+
512
+ window.addEventListener("touchstart", this.touchHandler, { passive: true });
490
513
  }
491
514
 
492
515
  cleanupHideHandlers() {
@@ -502,6 +525,11 @@ export default class AuroFloatingUI {
502
525
  this.clickHandler = null;
503
526
  }
504
527
 
528
+ if (this.touchHandler) {
529
+ window.removeEventListener("touchstart", this.touchHandler);
530
+ this.touchHandler = null;
531
+ }
532
+
505
533
  if (this.keyDownHandler) {
506
534
  document.removeEventListener("keydown", this.keyDownHandler);
507
535
  this.keyDownHandler = null;