@aurodesignsystem/auro-library 5.0.0 → 5.0.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 +7 -0
- package/package.json +1 -1
- package/scripts/runtime/floatingUI.mjs +24 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Semantic Release Automated Changelog
|
|
2
2
|
|
|
3
|
+
## [5.0.1](https://github.com/AlaskaAirlines/auro-library/compare/v5.0.0...v5.0.1) (2025-06-02)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* resolve issues with isMousePressed and keeping bibs open on focus loss ([3ae2c38](https://github.com/AlaskaAirlines/auro-library/commit/3ae2c38003eda3c58f1278924844bfd9f57e349f))
|
|
9
|
+
|
|
3
10
|
# [5.0.0](https://github.com/AlaskaAirlines/auro-library/compare/v4.5.0...v5.0.0) (2025-05-29)
|
|
4
11
|
|
|
5
12
|
|
package/package.json
CHANGED
|
@@ -24,8 +24,28 @@ export default class AuroFloatingUI {
|
|
|
24
24
|
if (!AuroFloatingUI.isMousePressHandlerInitialized && window && window.addEventListener) {
|
|
25
25
|
AuroFloatingUI.isMousePressHandlerInitialized = true;
|
|
26
26
|
|
|
27
|
+
// Track timeout for isMousePressed reset to avoid race conditions
|
|
28
|
+
if (!AuroFloatingUI._mousePressedTimeout) {
|
|
29
|
+
AuroFloatingUI._mousePressedTimeout = null;
|
|
30
|
+
}
|
|
27
31
|
const mouseEventGlobalHandler = (event) => {
|
|
28
|
-
|
|
32
|
+
const isPressed = event.type === 'mousedown';
|
|
33
|
+
if (isPressed) {
|
|
34
|
+
// Clear any pending timeout to prevent race condition
|
|
35
|
+
if (AuroFloatingUI._mousePressedTimeout !== null) {
|
|
36
|
+
clearTimeout(AuroFloatingUI._mousePressedTimeout);
|
|
37
|
+
AuroFloatingUI._mousePressedTimeout = null;
|
|
38
|
+
}
|
|
39
|
+
if (!AuroFloatingUI.isMousePressed) {
|
|
40
|
+
AuroFloatingUI.isMousePressed = true;
|
|
41
|
+
}
|
|
42
|
+
} else if (AuroFloatingUI.isMousePressed && !isPressed) {
|
|
43
|
+
// Schedule reset and track timeout ID
|
|
44
|
+
AuroFloatingUI._mousePressedTimeout = setTimeout(() => {
|
|
45
|
+
AuroFloatingUI.isMousePressed = false;
|
|
46
|
+
AuroFloatingUI._mousePressedTimeout = null;
|
|
47
|
+
}, 0);
|
|
48
|
+
}
|
|
29
49
|
};
|
|
30
50
|
|
|
31
51
|
window.addEventListener('mousedown', mouseEventGlobalHandler);
|
|
@@ -287,8 +307,9 @@ export default class AuroFloatingUI {
|
|
|
287
307
|
if (this.element.contains(activeElement) || this.element.bib?.contains(activeElement)) {
|
|
288
308
|
return;
|
|
289
309
|
}
|
|
290
|
-
|
|
291
|
-
if
|
|
310
|
+
|
|
311
|
+
// if fullscreen bib is in fullscreen mode, do not close
|
|
312
|
+
if (this.element.bib.hasAttribute('isfullscreen')) {
|
|
292
313
|
return;
|
|
293
314
|
}
|
|
294
315
|
|