@mlola-ui/behavior 1.1.13 → 1.1.14
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/package.json +1 -1
- package/src/index.js +11 -3
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -582,9 +582,17 @@ const behaviors = {
|
|
|
582
582
|
on(root, "pointerleave", hide),
|
|
583
583
|
on(root, "focusin", show),
|
|
584
584
|
on(root, "focusout", hide),
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
585
|
+
// Heard before a dialog around it (capture), and marked as used while the tip shows, so one Escape closes one layer.
|
|
586
|
+
on(
|
|
587
|
+
document,
|
|
588
|
+
"keydown",
|
|
589
|
+
(event) => {
|
|
590
|
+
if (event.key !== "Escape" || tip.hidden || event.defaultPrevented) return;
|
|
591
|
+
event.preventDefault();
|
|
592
|
+
hide();
|
|
593
|
+
},
|
|
594
|
+
true,
|
|
595
|
+
),
|
|
588
596
|
];
|
|
589
597
|
},
|
|
590
598
|
|